public function renderActive($renderer = null, $vars = null, $action = '', $method = 'get', $enctype = null, $focus = true) { if (is_null($vars)) { $vars = $this->_vars; } $vars = clone $vars; unset($vars->folder_new); parent::renderActive($renderer, $vars, $action, $method, $enctype, $focus); }
public function __construct($vars, $title = '', $name = null) { parent::__construct($vars, $title, $name); $v = $this->addVariable(_("Keep a copy of messages in this account?"), 'keep_copy', 'boolean', false); $v->setHelp('forward-keepcopy'); $v = $this->addVariable(_("Address(es) to forward to:"), 'addresses', 'ingo:Longemail', false, false, null, array(5, 40)); $v->setHelp('forward-addresses'); $this->setButtons(_("Save")); }
public function validate($vars = null, $canAutoFill = false) { if (is_null($vars)) { $vars = $this->_vars; } if (strlen($vars->get('folder_new'))) { $this->folder_var->type->newFolderSet = true; } return parent::validate($vars, $canAutoFill); }
/** * Additional validate of start and end date fields. */ public function validate($vars = null, $canAutoFill = false) { $valid = true; if (!parent::validate($vars, $canAutoFill)) { $valid = false; } if ($this->hasFeature('period')) { $this->_start->getInfo($vars, $start); $this->_end->getInfo($vars, $end); if ($start && $end && $end < $start) { $valid = false; $this->_errors['end'] = _("Vacation end date is prior to start."); } if ($end && $end < mktime(0, 0, 0)) { $valid = false; $this->_errors['end'] = _("Vacation end date is prior to today."); } } return $valid; }