1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
13:
14: class Whups_Form_Admin_EditReplyStepOne extends Horde_Form
15: {
16: public function __construct(&$vars)
17: {
18: parent::__construct($vars, _("Edit or Delete Form Replies"));
19: $this->setButtons(array(_("Edit Form Reply"), _("Delete Form Reply")));
20:
21: $replies = $GLOBALS['whups_driver']->getReplies($vars->get('type'));
22: if ($replies) {
23: $params = array();
24: foreach ($replies as $key => $reply) {
25: $params[$key] = $reply['reply_name'];
26: }
27: $stype = 'enum';
28: $type_params = array($params);
29: } else {
30: $stype = 'invalid';
31: $type_params = array(_("There are no form replies to edit"));
32: }
33:
34: $this->addHidden('', 'type', 'int', true, true);
35: $this->addVariable(
36: _("Form Reply Name"), 'reply', $stype, true, false, null, $type_params);
37: }
38:
39: }