4 * Form for making a user an admin for a group
8 * @author Evan Prodromou <evan@status.net>
9 * @author Sarven Capadisli <csarven@status.net>
10 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
11 * @link http://status.net/
13 class MakeAdminForm extends Form
16 * Profile of user to block
21 * Group to block the user from
33 * @param HTMLOutputter $out output channel
34 * @param Profile $profile profile of user to block
35 * @param User_group $group group to block user from
36 * @param array $args return-to args
38 function __construct($out=null, $profile=null, $group=null, $args=null)
40 parent::__construct($out);
42 $this->profile = $profile;
43 $this->group = $group;
50 * @return int ID of the form
54 // This should be unique for the page.
55 return 'makeadmin-' . $this->profile->id;
61 * @return string class of the form
65 return 'form_make_admin';
71 * @return string URL of the action
75 return common_local_url('makeadmin', array('nickname' => $this->group->nickname));
85 // TRANS: Form legend for form to make a user a group admin.
86 $this->out->element('legend', null, _('Make user an admin of the group'));
90 * Data elements of the form
96 $this->out->hidden('profileid-' . $this->profile->id,
99 $this->out->hidden('groupid-' . $this->group->id,
103 foreach ($this->args as $k => $v) {
104 $this->out->hidden('returnto-' . $k, $v);
114 function formActions()
118 // TRANS: Button text for the form that will make a user administrator.
119 _m('BUTTON','Make Admin'),
122 // TRANS: Submit button title.
123 _m('TOOLTIP','Make this user an admin'));