Advertisement
Guest User

Untitled

a guest
Jul 5th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. public function init()
  2. {
  3. $token = new Zend_Form_Element_Hash('token');
  4. $token->setTimeout($this->_tokenTimeout)
  5. ->setErrorMessages($this->_messages['token']['Identical'])
  6. ->setDecorators(array(
  7. array('ViewHelper')
  8. ));
  9.  
  10. $username = new Zend_Form_Element_Text('username');
  11. $username->class = 'formtext';
  12. $username->setLabel('Username')
  13. ->setDecorators(array(
  14. array('ViewHelper',
  15. array('helper' => 'formText'))
  16. ));
  17.  
  18. $password = new Zend_Form_Element_Password('password');
  19. $password->class = 'formtext';
  20. $password->setLabel('Username')
  21. ->setDecorators(array(
  22. array('ViewHelper',
  23. array('helper' => 'formPassword'))
  24. ));
  25.  
  26. $submit = new Zend_Form_Element_Submit('submit');
  27. $submit->class = 'formsubmit';
  28. $submit->setValue('Login')
  29. ->setLabel('Login')
  30. ->setDecorators(array(
  31. array('ViewHelper')
  32. ));
  33.  
  34. $this->addElements(array(
  35. $username,
  36. $password,
  37. $submit,
  38. $token
  39. ));
  40.  
  41. $this->setDecorators(array(
  42. 'FormElements',
  43. 'Fieldset',
  44. 'Form'
  45. ));
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement