Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- public function getForm()
- {
- $form = new Zend_Form;
- $form->setAction($this->view->url(array('controller' => 'login', 'action' => 'login')))
- ->setMethod('post');
- $form->setAttrib('id', 'fLogin');
- // elements
- $username = new Zend_Form_Element_Text('username', array(
- 'label' => 'Usuário',
- 'size' => 30,
- 'required' => true,
- 'validators' => array(
- 'alnum',
- array('stringLength', false, array(6,20))
- ),
- 'filters' => array('StringtoLower')
- ));
- $username->addDecorators(array(
- 'ViewHelper',
- 'Errors',
- array('HtmlTag', array('tag' => 'dd')),
- array('Label', array('tag' => 'dt')),
- ));
- $form->addElementPrefixPath('MDN_Form_Decorator_Label', 'MDN/Form/Decorator/Label/', 'decorator');
- $password = new Zend_Form_Element_Password('password', array(
- 'label' => 'Senha',
- 'size' => 30,
- 'required' => true,
- 'validators' => array(
- array('stringLength', false, array(6))
- )
- ));
- $submit = new Zend_Form_Element_Submit('login', array(
- 'label' => 'Logar',
- 'class' => 'btn'
- ));
- //$form->setDecorators(array(
- //'FormElements',array('Fieldset', array('legend' => 'Bem Vindo ao WMS-MS'))
- //));
- $form->addElement($username)
- ->addElement($password)
- ->addElement($submit);
- return $form;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement