1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
13:
14: class Whups_Form_Admin_EditReplyStepTwo extends Horde_Form
15: {
16: public function __construct(&$vars)
17: {
18: parent::__construct($vars, _("Edit Form Reply"));
19:
20: $reply = $vars->get('reply');
21: $info = $GLOBALS['whups_driver']->getReply($reply);
22:
23: $this->addHidden('', 'type', 'int', true, true);
24: $this->addHidden('', 'reply', 'int', true, true);
25: $pname = &$this->addVariable(
26: _("Form Reply Name"), 'reply_name', 'text', true);
27: $pname->setDefault($info['reply_name']);
28: $ptext = &$this->addVariable(
29: _("Form Reply Text"), 'reply_text', 'longtext', true);
30: $ptext->setDefault($info['reply_text']);
31:
32:
33: if ($GLOBALS['registry']->isAdmin(array('permission' => 'whups:admin', 'permlevel' => Horde_Perms::EDIT))) {
34: $permslink = array(
35: 'text' => _("Edit the permissions on this form reply"),
36: 'url' => Horde_Util::addParameter(Horde_Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/admin/perms/edit.php'), 'category', "whups:replies:$reply"), 'autocreate', '1'));
37: $this->addVariable('', 'link', 'link', false, true, null, array($permslink));
38: }
39: }
40:
41: }