1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10:
11:
12: class Whups_Form_SetTypeStepOne extends Horde_Form
13: {
14: public function __construct(&$vars, $title = '')
15: {
16: global $whups_driver;
17:
18: parent::__construct($vars, $title);
19:
20: $this->addHidden('', 'id', 'int', true, true);
21:
22:
23: $queue = $vars->get('queue');
24: $this->addVariable(_("New Type"), 'type', 'enum', true, false, null, array($whups_driver->getTypes($queue)));
25: $this->addVariable(_("Comment"), 'newcomment', 'longtext', false);
26:
27:
28: $groups = $GLOBALS['injector']->getInstance('Horde_Group');
29: $mygroups = $groups->listGroups($GLOBALS['registry']->getAuth());
30: if ($mygroups) {
31: foreach (array_keys($mygroups) as $gid) {
32: $grouplist[$gid] = $groups->getName($gid, true);
33: }
34: asort($grouplist);
35: $grouplist = array_merge(array(0 => _("Any Group")), $grouplist);
36: $this->addVariable(_("Viewable only by members of"), 'group', 'enum', true, false, null, array($grouplist));
37: }
38: }
39:
40: }