summaryrefslogtreecommitdiffstats
path: root/application/forms
diff options
context:
space:
mode:
authorsebastian wagner2011-07-04 17:37:02 +0200
committersebastian wagner2011-07-04 17:37:02 +0200
commit5359f6e8de1c409f4cb717c700de63409dfb3a49 (patch)
tree45dda64680ee4da0055fff1eaa92c1d87638d093 /application/forms
parentminor (diff)
downloadpoolctrl-5359f6e8de1c409f4cb717c700de63409dfb3a49.tar.gz
poolctrl-5359f6e8de1c409f4cb717c700de63409dfb3a49.tar.xz
poolctrl-5359f6e8de1c409f4cb717c700de63409dfb3a49.zip
login formular
Diffstat (limited to 'application/forms')
-rw-r--r--application/forms/Login.php48
-rw-r--r--application/forms/MembershipSelect.php52
-rw-r--r--application/forms/NewPassword.php48
-rw-r--r--application/forms/RecoverPassword.php38
4 files changed, 186 insertions, 0 deletions
diff --git a/application/forms/Login.php b/application/forms/Login.php
new file mode 100644
index 0000000..d9084ec
--- /dev/null
+++ b/application/forms/Login.php
@@ -0,0 +1,48 @@
+<?php
+/*
+ * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
+ * This program is free software distributed under the GPL version 2.
+ * See http://gpl.openslx.org/
+ *
+ * If you have any feedback please consult http://feedback.openslx.org/ and
+ * send your suggestions, praise, or complaints to feedback@openslx.org
+ *
+ * General information about OpenSLX can be found at http://openslx.org/
+ */
+
+class Application_Form_Login extends Zend_Form
+{
+
+ public function init()
+ {
+ $this->setName("LoginForm");
+ $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/forms/MembershipSelect.php b/application/forms/MembershipSelect.php
new file mode 100644
index 0000000..b940984
--- /dev/null
+++ b/application/forms/MembershipSelect.php
@@ -0,0 +1,52 @@
+<?php
+/*
+ * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
+ * This program is free software distributed under the GPL version 2.
+ * See http://gpl.openslx.org/
+ *
+ * If you have any feedback please consult http://feedback.openslx.org/ and
+ * send your suggestions, praise, or complaints to feedback@openslx.org
+ *
+ * General information about OpenSLX can be found at http://openslx.org/
+ */
+
+class Application_Form_MembershipSelect extends Zend_Form
+{
+ private $membershiplist;
+
+ public function setMembershiplist($membershiplist){
+ $this->membershiplist = $membershiplist;
+
+ }
+
+ public function getMembershiplist(){
+ return $this->membershiplist;
+ }
+
+ public function init()
+ {
+ $this->setName("MembershipSelect");
+ $this->setMethod('post');
+
+ $membershipfield = $this->createElement('select','membershipID');
+ $membershipfield ->setLabel('Membership:');
+
+ if(count($this->membershiplist)>0){
+ foreach($this->membershiplist as $membership => $m){
+ $membershipfield->addMultiOption($m['membershipID'], $m['group']);
+ }
+ }
+
+ $membershipfield->setRegisterInArrayValidator(false);
+ $this->addElement($membershipfield);
+
+ $this->addElement('submit', 'selectmembership', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Select',
+ ));
+ }
+
+
+}
+
diff --git a/application/forms/NewPassword.php b/application/forms/NewPassword.php
new file mode 100644
index 0000000..d3ca34b
--- /dev/null
+++ b/application/forms/NewPassword.php
@@ -0,0 +1,48 @@
+<?php
+/*
+ * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
+ * This program is free software distributed under the GPL version 2.
+ * See http://gpl.openslx.org/
+ *
+ * If you have any feedback please consult http://feedback.openslx.org/ and
+ * send your suggestions, praise, or complaints to feedback@openslx.org
+ *
+ * General information about OpenSLX can be found at http://openslx.org/
+ */
+
+class Application_Form_NewPassword extends Zend_Form
+{
+ private $personID;
+
+ public function setPersonID($personID){
+ $this->personID = $personID;
+ }
+
+ public function init()
+ {
+ $this->setName("NewPassword");
+ $this->setMethod('post');
+
+ $this->addElement('hidden', 'personID', array(
+ 'value' => $this->personID
+ ));
+
+ $this->addElement('password', 'password', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Password:',
+ ));
+
+ $this->addElement('submit', 'savePassword', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Save',
+ ));
+ }
+
+
+}
+
diff --git a/application/forms/RecoverPassword.php b/application/forms/RecoverPassword.php
new file mode 100644
index 0000000..273b426
--- /dev/null
+++ b/application/forms/RecoverPassword.php
@@ -0,0 +1,38 @@
+<?php
+/*
+ * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
+ * This program is free software distributed under the GPL version 2.
+ * See http://gpl.openslx.org/
+ *
+ * If you have any feedback please consult http://feedback.openslx.org/ and
+ * send your suggestions, praise, or complaints to feedback@openslx.org
+ *
+ * General information about OpenSLX can be found at http://openslx.org/
+ */
+
+class Appliocation_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',
+ ));
+ }
+
+
+}
+