1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
13:
14: class Whups_Form_Admin_EditQueueStepOne extends Horde_Form
15: {
16: public function __construct(&$vars)
17: {
18: global $whups_driver, $registry;
19:
20: if ($registry->hasMethod('tickets/listQueues') == $registry->getApp()) {
21: parent::Horde_Form($vars, _("Edit or Delete Queues"));
22: $this->setButtons(array(_("Edit Queue"), _("Delete Queue")));
23: } else {
24: parent::Horde_Form($vars, _("Edit Queues"));
25: $this->setButtons(array(_("Edit Queue")));
26: }
27:
28: $queues = Whups::permissionsFilter(
29: $whups_driver->getQueues(), 'queue', Horde_Perms::EDIT);
30: if ($queues) {
31: $modtype = 'enum';
32: $type_params = array($queues);
33: } else {
34: $modtype = 'invalid';
35: $type_params = array(_("There are no queues to edit"));
36: }
37:
38: $this->addVariable(
39: _("Queue Name"), 'queue', $modtype, true, false, null, $type_params);
40: }
41:
42: }