Ejemplo n.º 1
0
 /**
  * Initialization
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     $this->setName('userPasswordResetForm');
     $this->setMethod('post');
     $this->addElement('password', 'password', array('filters' => array('StringTrim'), 'validators' => array(array('StringLength', false, array(6, 50))), 'required' => true, 'label' => 'Password:'******'description' => 'Minimum of 6 characters. Must include at least one number and one letter.'));
     $this->addElement('password', 'passwordConfirm', array('filters' => array('StringTrim'), 'validators' => array(array('StringLength', false, array(6, 50)), array('Identical', false, array('token' => 'password'))), 'required' => true, 'ignore' => true, 'label' => 'Confirm password:'******'submit', 'submit', array('required' => false, 'ignore' => true, 'label' => 'Submit', 'decorators' => array('ViewHelper')));
 }
Ejemplo n.º 2
0
 /**
  * Initialization
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     $this->setName('userPasswordChangeForm');
     $this->setMethod('post');
     $this->addElement('password', 'oldPassword', array('filters' => array('StringTrim'), 'validators' => array(array('StringLength', false, array(6, 50))), 'required' => true, 'label' => 'Current Password:'******'password', 'newPassword', array('filters' => array('StringTrim'), 'validators' => array(array('StringLength', false, array(6, 40)), array('RegEx', false, array('pattern' => '/[a-z]\\d|\\d[a-z]/', 'messages' => array(Zend_Validate_Regex::NOT_MATCH => 'Password must contain one letter, one number, and at least 6 characters.', Zend_Validate_Regex::ERROROUS => 'Internal application error. Please try again.')))), 'required' => true, 'label' => 'New Password:'******'password', 'passwordConfirm', array('filters' => array('StringTrim'), 'validators' => array(array('StringLength', false, array(6, 40)), array('Identical', false, array('token' => 'newPassword'))), 'required' => true, 'ignore' => true, 'label' => 'Confirm new password:'******'submit', 'submit', array('required' => false, 'ignore' => true, 'label' => 'Submit', 'decorators' => array('ViewHelper', array('HtmlTag', array('tag' => 'li', 'class' => 'align-content-center')))));
 }
Ejemplo n.º 3
0
 /**
  * Initialization
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     $this->setName('userLoginForm');
     $this->setMethod('post');
     $this->addElement('text', 'username', array('filters' => array('StringTrim', 'StringToLower'), 'validators' => array(array('StringLength', false, array(0, 50))), 'required' => true, 'label' => 'Username:'******'decorators' => array('ViewHelper', new DescriptionTooltip(), 'Label', array('HtmlTag', array('tag' => 'li')))));
     $this->addElement('password', 'password', array('filters' => array('StringTrim'), 'validators' => array(array('StringLength', false, array(0, 50))), 'required' => true, 'label' => 'Password:'******'description' => '<a href="' . $this->getView()->url(array(), 'lostPassword') . '" title="Forgot your password?">Forgot?</a>', 'decorators' => array('ViewHelper', array('Description', array('class' => 'description', 'escape' => false)), 'Label', array('HtmlTag', array('tag' => 'li')))));
     $this->addElement('submit', 'login', array('required' => false, 'ignore' => true, 'label' => 'Login', 'decorators' => array('ViewHelper', array('HtmlTag', array('tag' => 'li', 'class' => 'align-content-center')))));
     #$this->addElement('hash', 'csrf', array(
     #  'ignore' => true,
     #));
 }