From e2d929c54a0d951c9bae51df7df5178bf9f0066f Mon Sep 17 00:00:00 2001 From: michael pereira Date: Mon, 25 Apr 2011 11:40:40 +0200 Subject: config fertig --- application/modules/user/forms/Config.php | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'application/modules/user/forms/Config.php') diff --git a/application/modules/user/forms/Config.php b/application/modules/user/forms/Config.php index 53e260d..3b961b9 100644 --- a/application/modules/user/forms/Config.php +++ b/application/modules/user/forms/Config.php @@ -1,4 +1,4 @@ -type = $type; } + public function init() { $this->setName($this->action); @@ -45,18 +46,23 @@ class user_Form_Config extends Zend_Form 'label' => 'Title:', )); - - $this->addElement('textarea', 'shellscript', array( + $this->addElement('textarea', 'description', array( 'filters' => array('StringTrim'), 'validators' => array( array('StringLength', false, array(0, 50)), ), - 'required' => true, - 'rows' => 10, - 'cols' => 70, - 'readOnly' => $meta, - 'label' => 'Shellscript:', - )); + 'required' => false, + 'rows' => 5, + 'cols' => 50, + 'label' => 'Description:', + )); + + if($this->type == 'group'){ + $visible = $this->createElement('checkbox','visible'); + $visible->setLabel('Visible:'); + $visible->setAttrib('readOnly', $meta); + $this->addElement($visible); + } if($this->action == "createconfig") $label = "Create Config"; -- cgit v1.2.3-55-g7522