1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
13:
14: class Whups_Form_Admin_EditPriorityStepOne extends Horde_Form
15: {
16: public function __construct(&$vars)
17: {
18: global $whups_driver;
19:
20: parent::__construct($vars, _("Edit or Delete Priorities"));
21: $this->setButtons(array(_("Edit Priority"), _("Delete Priority")));
22:
23: $priorities = $whups_driver->getPriorities($vars->get('type'));
24: if ($priorities) {
25: $stype = 'enum';
26: $type_params = array($priorities);
27: } else {
28: $stype = 'invalid';
29: $type_params = array(_("There are no priorities to edit"));
30: }
31:
32: $this->addHidden('', 'type', 'int', true, true);
33: $this->addVariable(_("Priority Name"), 'priority', $stype, true, false, null, $type_params);
34: }
35:
36: }