Example #1
0
 /**
  * @param string $name
  * @return BaseForm
  */
 protected function createComponentSignInForm($name)
 {
     $this[$name] = $form = new BaseForm();
     $form->getRenderer()->errorsAtInputs = FALSE;
     $form->addText('email', 'Email')->setAttribute('class', 'input-block-level')->setAttribute('placeholder', 'Email address')->setRequired('Please enter your email.');
     $form->addPassword('password', 'Password')->setAttribute('class', 'input-block-level')->setAttribute('placeholder', 'Password')->setRequired('Please enter your password.');
     $form->addCheckbox('remember', 'Remember me');
     $form->addSubmit('send', 'Sign in');
     $form->onSuccess[] = $this->processSignInForm;
     return $form;
 }