diff options
| author | mentos | 2011-01-31 15:17:20 +0100 |
|---|---|---|
| committer | mentos | 2011-01-31 15:17:20 +0100 |
| commit | 8ffbf1db98cd569ee64261254492d3234f9bb66a (patch) | |
| tree | f3c20705e1801e2ef85d5aef13d64b57978f9f8d | |
| parent | Person Controller (diff) | |
| download | pbs2-8ffbf1db98cd569ee64261254492d3234f9bb66a.tar.gz pbs2-8ffbf1db98cd569ee64261254492d3234f9bb66a.tar.xz pbs2-8ffbf1db98cd569ee64261254492d3234f9bb66a.zip | |
Person Register Form
| -rw-r--r-- | .buildpath | 9 | ||||
| -rw-r--r-- | .settings/org.eclipse.php.core.prefs | 3 | ||||
| -rw-r--r-- | application/forms/PersonRegister.php | 105 | ||||
| -rw-r--r-- | application/views/scripts/person/register.phtml | 4 |
4 files changed, 121 insertions, 0 deletions
diff --git a/.buildpath b/.buildpath new file mode 100644 index 0000000..288622b --- /dev/null +++ b/.buildpath @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<buildpath> + <buildpathentry kind="src" path="application"/> + <buildpathentry kind="src" path="library/Zend"/> + <buildpathentry kind="src" path="public"/> + <buildpathentry kind="src" path="tests/application"/> + <buildpathentry kind="src" path="tests/library"/> + <buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/> +</buildpath> diff --git a/.settings/org.eclipse.php.core.prefs b/.settings/org.eclipse.php.core.prefs new file mode 100644 index 0000000..6b81819 --- /dev/null +++ b/.settings/org.eclipse.php.core.prefs @@ -0,0 +1,3 @@ +#Thu Jan 20 16:34:38 CET 2011 +eclipse.preferences.version=1 +include_path=0;/pbs2 diff --git a/application/forms/PersonRegister.php b/application/forms/PersonRegister.php new file mode 100644 index 0000000..0babb27 --- /dev/null +++ b/application/forms/PersonRegister.php @@ -0,0 +1,105 @@ +<?php + +class Application_Form_PersonRegister extends Zend_Form +{ + + public function init() + { + $this->setName("Login"); + $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' => 'Login', + )); + + + } + + + +} + diff --git a/application/views/scripts/person/register.phtml b/application/views/scripts/person/register.phtml new file mode 100644 index 0000000..5196738 --- /dev/null +++ b/application/views/scripts/person/register.phtml @@ -0,0 +1,4 @@ +<?php +$this->registerForm->setAction($this->url()); +echo $this->registerForm; +?> |
