/**
  * Registration form factory.
  * @return \Nette\Application\UI\Form
  */
 protected function createComponentRegistrationForm()
 {
     CaptchaControl::register($this->getSession());
     $form = $this->factory->create();
     $form->onSuccess[] = function () {
         $this->redirect('Cabinet:cabinet', array('id' => $this->factory->getId()));
     };
     return $form;
 }
Exemple #2
0
 protected function createComponentRegistrationForm()
 {
     $form = $this->registrationFactory->create($this->model);
     $form->onSuccess[] = array($this, 'registrationFormSucceeded');
     return $form;
 }