Пример #1
0
 /**
  * Sign-in form factory.
  * @return Nette\Application\UI\Form
  */
 protected function createComponentSignInForm()
 {
     $form = $this->factory->create();
     $form->onSuccess[] = function ($form) {
         $form->getPresenter()->redirect('Homepage:');
     };
     return $form;
 }
Пример #2
0
 /**
  * Sign-in form factory.
  * @return Nette\Application\UI\Form
  */
 protected function createComponentSignInForm()
 {
     $form = $this->factory->create();
     $form->onSuccess[] = function (\Nette\Application\UI\Form $form) {
         $this->redirect('Main:');
     };
     return $form;
 }
Пример #3
0
 /**
  * Sign-in form factory.
  * @return Nette\Application\UI\Form
  */
 protected function createComponentSignInForm()
 {
     $form = $this->factory->create();
     $form->onSuccess[] = function () {
         $this->redirect("Cabinet:cabinet", array('id' => $this->factory->getId()));
     };
     return $form;
 }
 /**
  * Sign-in form factory.
  * @return Nette\Application\UI\Form
  */
 protected function createComponentSignInForm()
 {
     $form = $this->factory->create();
     $form->onSuccess[] = function (Form $form) {
         $this->redirect('Dashboard:');
     };
     return $form;
 }
Пример #5
0
 /**
  * Sign-in form factory.
  * @return Nette\Application\UI\Form
  */
 protected function createComponentSignInForm()
 {
     $form = $this->factory->create();
     $form->onSuccess[] = function () {
         $this->restoreRequest($this->p);
         $this->redirect('Homepage:');
     };
     return $form;
 }
 /**
  * Sign-in form factory.
  * @return Nette\Application\UI\Form
  */
 protected function createComponentSignInForm()
 {
     $form = $this->factory->create();
     $form->onSuccess[] = function ($form) {
         $this->flashMessage('You have been sucessfully signed in.');
         $this->redirect('Homepage:');
     };
     return $form;
 }
Пример #7
0
 /**
  * Sign-in form factory.
  * @return Nette\Application\UI\Form
  */
 protected function createComponentSignInForm()
 {
     $form = $this->factory->create();
     $form->onSuccess[] = function (Form $form) {
         $form->getPresenter()->flashMessage('You have been logged in!', 'success');
         $form->getPresenter()->redirect('Homepage:');
     };
     return BootstrapForm::makeBootstrap($form);
 }
Пример #8
0
 /**
  * Sign-in form factory.
  * @return Nette\Application\UI\Form
  */
 protected function createComponentSignInForm()
 {
     $form = $this->signFactory->create();
     $form->onSuccess[] = function ($form) {
         if ($this->user->identity->id_gender == 1) {
             $this->flashMessage('Byl jste úspěšně přihlášen.');
         } else {
             $this->flashMessage('Byla jste úspěšně přihlášena.');
         }
         $this->redirect('Homepage:default');
     };
     return $form;
 }
 /**
  * Tovarnicka pro prihlasovaci formular.
  * @return Nette\Application\UI\Form
  */
 protected function createComponentSign()
 {
     $form = $this->factory->create();
     $form->onSuccess[] = function ($form) {
         $this->flashMessage('Přihlášení proběhlo bez problémů.');
         $this->redirect('Homepage:default');
     };
     return $form;
 }
Пример #10
0
 /**
  * Sign-in form factory.
  *
  * @return Nette\Application\UI\Form
  */
 protected function createComponentSignInForm()
 {
     $form = $this->factory->create();
     $form->onSuccess[] = function ($form) {
         if ($this->user->id) {
             $this->logEvent($this->userRepository->find($this->user->id), 'login');
         }
         if (!empty($this->backlink)) {
             try {
                 $this->getPresenter()->redirect($this->getPresenter()->restoreRequest($this->backlink));
             } catch (Nette\Application\UI\InvalidLinkException $e) {
                 $form->getPresenter()->redirect('Homepage:');
             }
         } else {
             $form->getPresenter()->redirect('Homepage:');
         }
     };
     return $form;
 }
Пример #11
0
 /**
  * Sign-in form factory.
  * @return Nette\Application\UI\Form
  */
 protected function createComponentSignInForm()
 {
     $form = $this->factory->create();
     $form->onSuccess[] = array($this, 'signInFormSucceeded');
     return $form;
 }
Пример #12
0
 /**
  * Sign-in form factory.
  * @return Nette\Application\UI\Form
  */
 protected function createComponentSignInForm()
 {
     $form = $this->factory->create();
     return $form;
 }