summaryrefslogtreecommitdiffstats
path: root/application/modules/user/forms
diff options
context:
space:
mode:
authorBjörn Geiger2011-03-21 10:06:49 +0100
committerBjörn Geiger2011-03-21 10:06:49 +0100
commite4d3c4db0929770ebf70fd0d943821c5ca128519 (patch)
treea4fe4dd820d6fa705ff26460aa9ecdcf2efc6418 /application/modules/user/forms
parentidee mit untergruppen herausfinden (diff)
downloadpbs2-e4d3c4db0929770ebf70fd0d943821c5ca128519.tar.gz
pbs2-e4d3c4db0929770ebf70fd0d943821c5ca128519.tar.xz
pbs2-e4d3c4db0929770ebf70fd0d943821c5ca128519.zip
Login in User Module
Diffstat (limited to 'application/modules/user/forms')
-rw-r--r--application/modules/user/forms/Login.php27
-rw-r--r--application/modules/user/forms/RecoverPassword.php28
-rw-r--r--application/modules/user/forms/Register.php105
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',
+ ));
+
+
+ }
+
+
+
+}
+