From 38a1adce564a405684d3397b77a58bfc50d1d3e7 Mon Sep 17 00:00:00 2001 From: michael pereira Date: Sun, 6 Mar 2011 16:16:43 +0100 Subject: Config fertig --- application/forms/ConfigEdit.php | 45 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) (limited to 'application/forms/ConfigEdit.php') diff --git a/application/forms/ConfigEdit.php b/application/forms/ConfigEdit.php index 6403f06..3883595 100644 --- a/application/forms/ConfigEdit.php +++ b/application/forms/ConfigEdit.php @@ -3,11 +3,50 @@ class Application_Form_ConfigEdit extends Zend_Form { - public function init() + public function init() { - /* Form Elements & Other Definitions Here ... */ - } + $this->setName("ConfigEdit"); + $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', 'groupID', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'GroupID:', + 'value' => '1', + )); + + $this->addElement('textarea', 'shellscript', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Shellscript:', + )); + + $this->addElement('submit', 'editconfig', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Edit Config', + )); + + $this->addElement('button', 'Cancel', array( + 'onclick' => 'self.location="/config"' + )); + } } -- cgit v1.2.3-55-g7522