From 56d0655309fb13e8a2b8bb86a54206b419c32d18 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 18 Mar 2011 09:59:02 +0100 Subject: Datenbank update, PoolController --- application/modules/user/forms/Pool.php | 54 +++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 application/modules/user/forms/Pool.php (limited to 'application/modules/user/forms/Pool.php') diff --git a/application/modules/user/forms/Pool.php b/application/modules/user/forms/Pool.php new file mode 100644 index 0000000..909bdd6 --- /dev/null +++ b/application/modules/user/forms/Pool.php @@ -0,0 +1,54 @@ +setName("pool"); + $this->setMethod('post'); + + $this->addElement('text', 'title', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 30)), + ), + 'required' => true, + 'label' => 'Title:', + )); + $this->addElement('textarea', 'description', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 140)), + ), + 'required' => false, + 'label' => 'Description:', + )); + // TODO: Add target of Filter + + $this->addElement('text', 'location', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 30)), + ), + 'required' => true, + 'label' => 'Location:', + )); + + $this->addElement('submit', 'add', array( + 'required' => false, + 'ignore' => true, + 'label' => $this->buttontext, + )); + + $this->addElement('button', 'Cancel', array( + 'onclick' => 'self.location="/user/pool"' + )); + } + private $buttontext = 'Save'; + function setButtontext($v){ + $this->buttontext = $v; + } + +} + -- cgit v1.2.3-55-g7522