1: <?php
 2:  3:  4:  5:  6:  7:  8:  9: 10: 
11: class Vilma_Form_EditAlias extends Horde_Form
12: {
13:     public function __construct($vars)
14:     {
15:         $editing = $vars->get('mode') == 'edit';
16:         if ($editing) {
17:             $title = sprintf(_("Edit Alias \"%s\" for \"%s\""),
18:                              $vars->get('alias_address'),
19:                              $vars->get('address'));
20:         } else {
21:             $title = sprintf(_("New Alias 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('', 'alias', 'text', false);
33:         }
34:         $this->addVariable(_("Alias Address"), 'alias_address', 'email', true, false, _("The email address to add as an alias for this user.  Note that the server must be configured to receive mail for the domain contained in this address."));
35:     }
36: }
37: