Advertisement
Guest User

Formulář pro přihlášení

a guest
Jun 6th, 2013
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. public function createComponentSignInForm()
  2. {
  3.     $form = new Form;
  4.     $form->getElementPrototype()->name("login_form");
  5.        
  6.     $form->addText("username", "Jméno")
  7.         ->setRequired("Nebylo zadáno jméno.");
  8.  
  9.     $form->addPassword("password", "Heslo")
  10.         ->setRequired("Nebylo zadáno heslo.");
  11.  
  12.     $form->addCheckbox("remember", "Zapamatovat si přihlášení");
  13.  
  14.     $form->addSubmit("login", "Přihlásit se");
  15.  
  16.     $form->onSuccess[] = callback($this, "signInFormSubmitted");
  17.        
  18.     return $form;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement