1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10:
11: class Vilma_Form_EditForward extends Horde_Form
12: {
13: public function __construct($vars)
14: {
15: $editing = $vars->get('mode') == 'edit';
16: if ($editing) {
17: $title = sprintf(_("Edit Forward \"%s\" for \"%s\""),
18: $vars->get('forward_address'),
19: $vars->get('address'));
20: } else {
21: $title = sprintf(_("New Forward for %s"),
22: $vars->get('address'));
23: }
24: parent::Horde_Form($vars, $title);
25:
26:
27: $this->setButtons(true, true);
28: $this->addHidden('', 'address', 'text', false);
29: $this->addHidden('', 'mode', 'text', false);
30: $this->addHidden('', 'id', 'text', false);
31: if ($editing) {
32: $this->addHidden('', 'forward', 'text', false);
33: }
34: $this->addVariable(_("Forward Address"), 'forward_address', 'email', true, false, _("The email address to add as an forward for this user. Note that the server must be configured to receive mail for the domain contained in this address."));
35: }
36: }
37: