summaryrefslogtreecommitdiffstats
path: root/application/modules/dev/forms/PersonEdit.php
diff options
context:
space:
mode:
authorSimon2011-03-14 16:09:03 +0100
committerSimon2011-03-14 16:09:03 +0100
commitb5cbdd6b400aa1ec77c9846e9cc8d4257f437e3c (patch)
treefcef50ad1ddf831f457d6aecd83e7fdc63297a1c /application/modules/dev/forms/PersonEdit.php
parentfooter bleibt am fensterbottom (diff)
downloadpbs2-b5cbdd6b400aa1ec77c9846e9cc8d4257f437e3c.tar.gz
pbs2-b5cbdd6b400aa1ec77c9846e9cc8d4257f437e3c.tar.xz
pbs2-b5cbdd6b400aa1ec77c9846e9cc8d4257f437e3c.zip
Application in 3 Modules gesplittet, Dev = unsere entwicklungsumgebung, user = die weboberfläche fr anwender mit acl etc, fbgui = für die fbgui truppe - links in dev müssen noch angepasst werden
Diffstat (limited to 'application/modules/dev/forms/PersonEdit.php')
-rw-r--r--application/modules/dev/forms/PersonEdit.php117
1 files changed, 117 insertions, 0 deletions
diff --git a/application/modules/dev/forms/PersonEdit.php b/application/modules/dev/forms/PersonEdit.php
new file mode 100644
index 0000000..664daac
--- /dev/null
+++ b/application/modules/dev/forms/PersonEdit.php
@@ -0,0 +1,117 @@
+<?php
+
+class Application_Form_PersonEdit extends Zend_Form
+{
+
+ public function init()
+ {
+ $this->setName("PersonEdit");
+ $this->setMethod('post');
+
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ 'value' => $this->getView()->person->getTitle(),
+ ));
+
+
+ $this->addElement('text', 'name', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Name:',
+ 'value' => $this->getView()->person->getName(),
+ ));
+
+ $this->addElement('text', 'firstname', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Firstname:',
+ 'value' => $this->getView()->person->getFirstname(),
+ ));
+
+ $this->addElement('text', 'street', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Street:',
+ 'value' => $this->getView()->person->getStreet(),
+ ));
+
+ $this->addElement('text', 'housenumber', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Housenumber:',
+ 'value' => $this->getView()->person->getHousenumber(),
+ ));
+
+ $this->addElement('text', 'city', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'City:',
+ 'value' => $this->getView()->person->getCity(),
+ ));
+
+ $this->addElement('text', 'postalcode', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Postalcode:',
+ 'value' => $this->getView()->person->getPostalcode(),
+ ));
+
+ $this->addElement('text', 'email', array(
+ 'filters' => array('StringTrim', 'StringToLower'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Email:',
+ 'value' => $this->getView()->person->getEmail(),
+ ));
+
+ $this->addElement('password', 'newpassword', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => false,
+ 'label' => 'Neues Password:',
+ ));
+
+ $this->addElement('submit', 'save', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Save',
+ ));
+
+ $this->addElement('button', 'cancel', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Cancel',
+ 'onclick' => 'location.href="/person/show"',
+ ));
+ }
+
+
+}
+