/** * @return BaseForm */ public function create() { $form = new \Natsu\Forms\BaseForm(); $form->addText('email', 'E-mail:')->setRequired('Zadejte e-mail'); $form->addPassword('password')->setRequired('Zadejte heslo:'); $form->addPassword('confirm_password')->setRequired('Potvrďte heslo:'); $form->addSubmit('submit', 'Registrovat'); $form->onSuccess[] = array($this, 'formSucceeded'); return $form; }
/** * @return BaseForm */ public function create() { // echo $this->code; exit; $form = new \Natsu\Forms\BaseForm(); $form->addHidden("code", $this->code); $form->addPassword('password', 'Heslo:')->setRequired('Zadej nové heslo.'); $form->addPassword('confirm_password', 'Potvrzení hesla:')->setRequired('Zadej nové heslo znovu.'); $form->addSubmit('send', 'Uložit nové heslo'); $form->onSuccess[] = array($this, 'formSucceeded'); return $form; }