1 : <?php
2 :
3 : class Application_Form_UserLogin extends Zend_Form
4 0 : {
5 :
6 : protected $_defaultDecorators = array(
7 : array('ViewHelper'),
8 : array('Errors'),
9 : array('Label'),
10 : array('HtmlTag', array('tag' => 'li')),
11 : );
12 :
13 : public function init()
14 : {
15 0 : $this->setAction('/user/identify/')
16 0 : ->setMethod('POST');
17 :
18 0 : $this->addElement('text', 'user', array(
19 0 : 'filters' => array('StringTrim'),
20 : 'validators' => array(
21 0 : 'EmailAddress'),
22 0 : 'required' => true,
23 0 : 'label' => 'Email Address: ',
24 0 : 'decorators' => $this->_defaultDecorators,
25 0 : ));
26 0 : $this->addElement('password', 'pass', array(
27 0 : 'filters' => array('StringTrim'),
28 0 : 'required' => true,
29 0 : 'label' => 'Password: ',
30 0 : 'decorators' => $this->_defaultDecorators,
31 0 : ));
32 0 : $this->addElement('submit', 'submit', array(
33 0 : 'required' => false,
34 0 : 'ignore' => true,
35 0 : 'decorators' => array('ViewHelper', 'Errors'),
36 0 : ));
37 0 : }
38 :
39 : public function loadDefaultDecorators()
40 : {
41 0 : $this->setDisableLoadDefaultDecorators(true);
42 :
43 0 : $this->addDecorator('FormElements')
44 0 : ->addDecorator('HtmlTag', array('tag' => 'ul'))
45 0 : ->addDecorator('Form');
46 0 : }
47 :
|