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