]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/groupeditform.php
Add request_queue table and user_group.join_policy column, for upcoming join & subscr...
[quix0rs-gnu-social.git] / lib / groupeditform.php
index 8e4519267be6aaa796f7a8f3549bd0e44f3c2456..75f1344c11d59c2eca2205df1760bacc0e8b0f79 100644 (file)
@@ -46,13 +46,11 @@ require_once INSTALLDIR.'/lib/form.php';
  *
  * @see      UnsubscribeForm
  */
-
 class GroupEditForm extends Form
 {
     /**
      * group for user to join
      */
-
     var $group = null;
 
     /**
@@ -61,7 +59,6 @@ class GroupEditForm extends Form
      * @param Action     $out   output channel
      * @param User_group $group group to join
      */
-
     function __construct($out=null, $group=null)
     {
         parent::__construct($out);
@@ -74,7 +71,6 @@ class GroupEditForm extends Form
      *
      * @return string ID of the form
      */
-
     function id()
     {
         if ($this->group) {
@@ -89,7 +85,6 @@ class GroupEditForm extends Form
      *
      * @return string of the form class
      */
-
     function formClass()
     {
         return 'form_settings';
@@ -100,7 +95,6 @@ class GroupEditForm extends Form
      *
      * @return string URL of the action
      */
-
     function action()
     {
         if ($this->group) {
@@ -116,7 +110,6 @@ class GroupEditForm extends Form
      *
      * @return void
      */
-
     function formLegend()
     {
         $this->out->element('legend', null, _('Create a new group'));
@@ -127,7 +120,6 @@ class GroupEditForm extends Form
      *
      * @return void
      */
-
     function formData()
     {
         if ($this->group) {
@@ -194,6 +186,15 @@ class GroupEditForm extends Form
                                           common_config('group', 'maxaliases')));;
                 $this->out->elementEnd('li');
             }
+            $this->out->elementStart('li');
+            $this->out->dropdown('join_policy',
+                                 _('Membership policy'),
+                                 array(0 => _('Open to all'),
+                                       1 => _('Admin must approve all members')),
+                                 _('Whether admin approval is required to join this group.'),
+                                 false,
+                                 (empty($this->group->join_policy)) ? 0 : $this->group->join_policy);
+            $this->out->elementEnd('li');
             Event::handle('EndGroupEditFormData', array($this));
         }
         $this->out->elementEnd('ul');
@@ -204,7 +205,6 @@ class GroupEditForm extends Form
      *
      * @return void
      */
-
     function formActions()
     {
         $this->out->submit('submit', _m('BUTTON','Save'));