diff options
Diffstat (limited to 'application/modules/user/forms')
-rw-r--r-- | application/modules/user/forms/Login.php | 27 | ||||
-rw-r--r-- | application/modules/user/forms/RecoverPassword.php | 28 | ||||
-rw-r--r-- | application/modules/user/forms/Register.php | 105 |
3 files changed, 159 insertions, 1 deletions
diff --git a/application/modules/user/forms/Login.php b/application/modules/user/forms/Login.php index 58c5cc9..342e0b2 100644 --- a/application/modules/user/forms/Login.php +++ b/application/modules/user/forms/Login.php @@ -5,7 +5,32 @@ class user_Form_Login extends Zend_Form public function init() { - /* Form Elements & Other Definitions Here ... */ + $this->setName("Login"); + $this->setMethod('post'); + + $this->addElement('text', 'email', array( + 'filters' => array('StringTrim', 'StringToLower'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'E-Mail:', + )); + + $this->addElement('password', 'password', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Password:', + )); + + $this->addElement('submit', 'login', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Login', + )); } diff --git a/application/modules/user/forms/RecoverPassword.php b/application/modules/user/forms/RecoverPassword.php new file mode 100644 index 0000000..90feb87 --- /dev/null +++ b/application/modules/user/forms/RecoverPassword.php @@ -0,0 +1,28 @@ +<?php + +class user_Form_RecoverPassword extends Zend_Form +{ + + public function init() + { + $this->setName("RecoverPassword"); + $this->setMethod('post'); + + $this->addElement('text', 'email', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 30)), + ), + 'required' => true, + 'label' => 'Email:', + )); + $this->addElement('submit', 'recoverPassword', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Recover Password', + )); + } + + +} + diff --git a/application/modules/user/forms/Register.php b/application/modules/user/forms/Register.php new file mode 100644 index 0000000..9c2a42d --- /dev/null +++ b/application/modules/user/forms/Register.php @@ -0,0 +1,105 @@ +<?php + +class user_Form_Register extends Zend_Form +{ + + public function init() + { + $this->setName("Register"); + $this->setMethod('post'); + + $this->addElement('text', 'title', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Title:', + )); + + + $this->addElement('text', 'name', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Name:', + )); + + $this->addElement('text', 'firstname', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Firstname:', + )); + + $this->addElement('text', 'street', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Street:', + )); + + $this->addElement('text', 'housenumber', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Housenumber:', + )); + + $this->addElement('text', 'city', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'City:', + )); + + $this->addElement('text', 'postalcode', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Postalcode:', + )); + + $this->addElement('text', 'email', array( + 'filters' => array('StringTrim', 'StringToLower'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Email:', + )); + + $this->addElement('password', 'password', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Password:', + )); + + $this->addElement('submit', 'register', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Register', + )); + + + } + + + +} + |