diff --git a/application/modules/default/forms/Login.php b/application/modules/default/forms/Login.php index 3cefcaf19..2f558e3bf 100644 --- a/application/modules/default/forms/Login.php +++ b/application/modules/default/forms/Login.php @@ -1,107 +1,108 @@ . **/ class Default_Form_Login extends Zend_Form { public function init() { $this->setMethod('POST'); $this->setAction('/login/'); $this->addElementPrefixPath('Local', 'Local/'); $this->setAttrib('id', 'loginForm'); //$this->setAttrib('class', 'standard-form row-fluid'); $this->addElement($this->getHiddenRedirect()); $dologin = $this->createElement('hidden', 'dologin'); $dologin->setValue('true'); $dologin->setDecorators(array('ViewHelper')); $this->addElement($dologin); $loginName = $this->createElement('text', 'mail'); $loginName->setLabel('index.login.username'); $loginName->setFilters(array('StringTrim')); // $loginName->setValidators(array('EmailAddress')); $loginName->setRequired(true); $loginName->setDecorators(array('ViewHelper')); //$loginName->setAttrib('placeholder', 'Email or Username'); //$loginName->setAttrib('class', 'inputbox email'); $loginPass = $this->createElement('password', 'password'); $loginPass->setLabel('index.login.password'); $loginPass->setFilters(array('StringTrim')); $loginPass->setRequired(true); $loginPass->setDecorators(array('ViewHelper')); //$loginPass->setAttrib('placeholder', 'Password'); //$loginPass->setAttrib('class', 'inputbox password'); $rememberMe = $this->createElement('checkbox', 'remember_me') + ->setOptions(array("checked" => "checked")) ->setLabel('index.login.remember_me') ->setDecorators( array( 'ViewHelper', array('Label', array( 'placement' => 'append', 'class' => 'optional' ) ), array('HtmlTag', array('tag' => 'div', 'class' => 'container-checkbox-remember-me text-left')) ) ); $submit = $this->createElement('button', 'login'); $submit->setLabel('Login'); $submit->setDecorators(array('ViewHelper')); //$submit->setAttrib('class', 'btn btn-min-width btn-native'); //$submit->setAttrib('type', 'submit'); // $hash = $this->createElement('hash', 'csrfLogin', array('salt' => 'PlattenSpalter')); // $hash->setDecorators(array('ViewHelper', 'Errors')); // $hash->getValidator('Identical')->setMessage('Your session is outdated. Please reload the page an try again.'); // $this->addElement($hash); $this->addElement($loginName); $this->addElement($loginPass); $this->addElement($rememberMe); $this->addElement($submit); } private function getHiddenRedirect() { return $this->createElement('hidden', 'redirect') ->setFilters(array('StringTrim')) ->setDecorators( array( array( 'ViewScript', array( 'viewScript' => 'authorization/viewscripts/input_hidden.phtml', 'placement' => false ) ) )); } } \ No newline at end of file