Last active
August 29, 2015 14:08
-
-
Save carlosfilho88/73f40807eec0592a80aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Application_Form_Logindropdown extends Zend_Form { | |
public function init(){ | |
$this->setMethod('post') | |
->setAction('/login') | |
->setEnctype('UTF-8'); | |
$email = new Zend_Form_Element_Email('email'); | |
$email->setAttrib('placeholder', 'Digite seu e-mail') | |
->setAttrib('class', 'input-large') | |
->setAttrib('required', '') | |
->setFilters(array('StringTrim', 'StringToLower')) | |
->setDecorators(array('ViewHelper')) | |
->setRequired(true); | |
$senha = new Zend_Form_Element_Password('senha'); | |
$senha->setAttrib('placeholder', 'Digite sua senha') | |
->setAttrib('class', 'input-large') | |
->setAttrib('maxlength', 20) | |
->setAttrib('required', '') | |
->setValidators(array('Alnum',array('StringLength', false, array(5, 20, 'encoding' => 'UTF-8')))) | |
->setFilters(array('StringTrim')) | |
->setDecorators(array('ViewHelper')) | |
->setRequired(true); | |
$submit = new Zend_Form_Element_Submit('Entrar'); | |
$submit->setIgnore(true) | |
->setAttrib('class', 'btn btn-success ladda-button') | |
->setAttrib('data-style', 'zoom-in') | |
->setAttrib('display', 'block') | |
->setDecorators(array('ViewHelper')); | |
$this->setDecorators(array('FormElements','Form')); | |
$this->addElements(array($email, $senha, $submit)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment