1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13:
14:
15: class Whups_Form_Admin_EditUser extends Horde_Form
16: {
17: public function __construct(&$vars)
18: {
19: global $whups_driver;
20:
21: $this->appendButtons(_("Remove User"));
22:
23: parent::__construct($vars, _("Responsible Users"));
24:
25: $queue = $vars->get('queue');
26: $users = $whups_driver->getQueueUsers($queue);
27: $f_users = array();
28: foreach ($users as $user) {
29: $f_users[$user] = Whups::formatUser($user);
30: }
31: if ($f_users) {
32: asort($f_users);
33: $usertype = 'enum';
34: $type_params = array($f_users);
35: } else {
36: $usertype = 'invalid';
37: $type_params = array(_("There are no users responsible for this queue."));
38: }
39:
40: $this->addHidden('', 'queue', 'int', true, true);
41: $this->addVariable(_("Users responsible for this queue"), 'user', $usertype, true, false, null, $type_params);
42: }
43:
44: }
45: