2 // @todo FIXME: add standard file header.
5 * Form for making a user an admin for a group
9 * @author Evan Prodromou <evan@status.net>
10 * @author Sarven Capadisli <csarven@status.net>
11 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
12 * @link http://status.net/
14 class MakeAdminForm extends Form
17 * Profile of user to block
22 * Group to block the user from
34 * @param HTMLOutputter $out output channel
35 * @param Profile $profile profile of user to block
36 * @param User_group $group group to block user from
37 * @param array $args return-to args
39 function __construct($out=null, $profile=null, $group=null, $args=null)
41 parent::__construct($out);
43 $this->profile = $profile;
44 $this->group = $group;
51 * @return int ID of the form
55 // This should be unique for the page.
56 return 'makeadmin-' . $this->profile->id;
62 * @return string class of the form
66 return 'form_make_admin';
72 * @return string URL of the action
76 return common_local_url('makeadmin', array('nickname' => $this->group->nickname));
86 // TRANS: Form legend for form to make a user a group admin.
87 $this->out->element('legend', null, _('Make user an admin of the group'));
91 * Data elements of the form
97 $this->out->hidden('profileid-' . $this->profile->id,
100 $this->out->hidden('groupid-' . $this->group->id,
104 foreach ($this->args as $k => $v) {
105 $this->out->hidden('returnto-' . $k, $v);
115 function formActions()
119 // TRANS: Button text for the form that will make a user administrator.
120 _m('BUTTON','Make Admin'),
123 // TRANS: Submit button title.
124 _m('TOOLTIP','Make this user an admin.'));