]> dev.renevier.net Git - syj.git/blob - application/forms/Newpwd.php
update copyright headers
[syj.git] / application / forms / Newpwd.php
1 <?php
2 /*  This file is part of Syj, Copyright (c) 2010-2011 Arnaud Renevier,
3     and is published under the AGPL license. */
4
5 class Syj_Form_Newpwd extends Syj_Form_TableAbstract
6 {
7     protected $_elementDecorators = array(
8                           'ViewHelper',
9                           array(array('td' => 'HtmlTag'), array('tag' => 'td', 'style' => 'width: 100%' )),
10                           array('label', array('tag' => 'td')),
11                           array(array('tr' => 'HtmlTag'), array('tag' => 'tr')),
12                           array('TableDescription'),
13                           'Errors' => array('decorator' => 'Errors', 'options' => array('class' => 'error')),
14                           );
15
16     protected $_decorators = array(
17                             'FormElements' => array('decorator' => 'FormElements', 'options' => null),
18                             'Form' => array('decorator' => 'Form', 'options' => null),
19                             );
20
21
22     public function init() {
23         $formErrors = $this->getView()->getHelper('FormErrors');
24         $formErrors->setElementStart("<div%s>")
25                    ->setElementEnd("</div>")
26                    ->setElementSeparator("<br>");
27
28         $user = array('Text', 'newpwd_email', array( 'label' => __("email"),
29                                                      'required' => true,
30                                                      'maxlength' => 320
31                                                      ));
32         $this->setMainElements(array($user));
33         $this->addElement('Submit', 'newpwd_submit', array('label' => __("reset my password")));
34     }
35 }
36