1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
13:
14: class Whups_Form_Admin_EditStateStepTwo extends Horde_Form
15: {
16: public function __construct(&$vars)
17: {
18: parent::__construct($vars, _("Edit State"));
19:
20: $state = $vars->get('state');
21: $info = $GLOBALS['whups_driver']->getState($state);
22:
23: $this->addHidden('', 'type', 'int', true, true);
24: $this->addHidden('', 'state', 'int', true, true);
25:
26: $sname = &$this->addVariable(_("State Name"), 'name', 'text', true);
27: $sname->setDefault($info['name']);
28:
29: $sdesc = &$this->addVariable(_("State Description"), 'description', 'text', true);
30: $sdesc->setDefault($info['description']);
31:
32: $scat = &$this->addVariable(_("State Category"), 'category', 'enum', true, false, null, array($GLOBALS['whups_driver']->getCategories()));
33: $scat->setDefault($info['category']);
34: }
35:
36: }
37: