示例#1
0
 /**
  * Overrides init() in Zend_Form
  * 
  * @access public
  * @return void
  */
 public function init()
 {
     // init the parent
     parent::init();
     // set the form's method
     $this->setMethod('post');
     $password = new Zend_Form_Element_Password('password');
     $password->setOptions(array('label' => $this->t('Password'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty')));
     $this->addElement($password);
     $retypePassword = new Zend_Form_Element_Password('retypePassword');
     $retypePassword->setOptions(array('label' => $this->t('Retype password'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty')));
     $this->addElement($retypePassword);
     $this->addDisplayGroup(array('password', 'retypePassword'), 'passwords')->getDisplayGroup('passwords')->setLegend('Password');
 }
示例#2
0
 /**
  * {@inheritDoc}
  */
 public function init()
 {
     parent::init();
     $this->add(array('name' => 'redirect', 'type' => 'hidden'));
 }