From 06cfaf4e0a9b521a151cc214dd217018f4c83389 Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Thu, 24 Mar 2011 13:47:33 +0100 Subject: PersonController im user Module --- application/modules/user/forms/PersonEdit.php | 117 ++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 application/modules/user/forms/PersonEdit.php (limited to 'application/modules/user/forms/PersonEdit.php') diff --git a/application/modules/user/forms/PersonEdit.php b/application/modules/user/forms/PersonEdit.php new file mode 100644 index 0000000..d6c68e7 --- /dev/null +++ b/application/modules/user/forms/PersonEdit.php @@ -0,0 +1,117 @@ +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="/user/person/"', + )); + } + + +} + -- cgit v1.2.3-55-g7522