protected function setup() { parent::setup(); $this->addPassword('current', "Current")->setRequired(); $this->addPassword('password', "Password")->setRequired(); $this->addPassword('password2', "Re-Password")->addCondition(static::FILLED) ->addRule(static::EQUAL, NULL, $this['password']); $this->addSubmit('sub', "Save"); $this->onSuccess[] = callback($this, 'process'); }
protected function setup() { parent::setup(); $this->addText('username', "Username")->setRequired(); $this->addPassword('password', "Password")->setRequired(); $this->addCheckbox('remember', "Remember me")->setDisabled(); // @todo $this->addSubmit('sub', "Login"); $this->onSuccess[] = callback($this, "process"); }