diff options
| author | Simon | 2011-03-09 12:20:55 +0100 |
|---|---|---|
| committer | Simon | 2011-03-09 12:20:55 +0100 |
| commit | 1ac1db9336fdfa2f32e775e390a3d9fdaa605c79 (patch) | |
| tree | bcb7fc97937b9db314b74903ffed61a1d75506ea /application/forms/ConfigEdit.php | |
| parent | oberfläche verändert (diff) | |
| parent | ACHTUNG: Habe in einigen Mappern die find() Methode geändert, sie liefern je... (diff) | |
| download | pbs2-1ac1db9336fdfa2f32e775e390a3d9fdaa605c79.tar.gz pbs2-1ac1db9336fdfa2f32e775e390a3d9fdaa605c79.tar.xz pbs2-1ac1db9336fdfa2f32e775e390a3d9fdaa605c79.zip | |
Merge gefixxt
Diffstat (limited to 'application/forms/ConfigEdit.php')
| -rw-r--r-- | application/forms/ConfigEdit.php | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/application/forms/ConfigEdit.php b/application/forms/ConfigEdit.php index 3883595..53219d9 100644 --- a/application/forms/ConfigEdit.php +++ b/application/forms/ConfigEdit.php @@ -2,6 +2,12 @@ class Application_Form_ConfigEdit extends Zend_Form { + private $grouplist; + + public function setGrouplist($grouplist){ + $this->grouplist = $grouplist; + + } public function init() { @@ -17,15 +23,17 @@ class Application_Form_ConfigEdit extends Zend_Form 'label' => 'Title:', )); - $this->addElement('text', 'groupID', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'required' => true, - 'label' => 'GroupID:', - 'value' => '1', - )); + $groupfield = $this->createElement('select','groupID'); + $groupfield ->setLabel('Group:'); + + if(count($this->grouplist)>0){ + foreach($this->grouplist as $group => $g){ + $groupfield->addMultiOption($g->getID(), $g->getTitle()); + } + } + + $groupfield->setRegisterInArrayValidator(false); + $this->addElement($groupfield); $this->addElement('textarea', 'shellscript', array( 'filters' => array('StringTrim'), @@ -33,6 +41,8 @@ class Application_Form_ConfigEdit extends Zend_Form array('StringLength', false, array(0, 50)), ), 'required' => true, + 'rows' => 10, + 'cols' => 70, 'label' => 'Shellscript:', )); |
