summaryrefslogtreecommitdiffstats
path: root/application/forms/ConfigCreate.php
diff options
context:
space:
mode:
authormichael pereira2011-03-09 11:55:55 +0100
committermichael pereira2011-03-09 11:55:55 +0100
commit52304b789d93e1745c0f6ad6cbe833bbc4e37ba2 (patch)
treedf3ef4566129c4f1cdb3fc5410093c2b83900993 /application/forms/ConfigCreate.php
parentMerge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff)
downloadpbs2-52304b789d93e1745c0f6ad6cbe833bbc4e37ba2.tar.gz
pbs2-52304b789d93e1745c0f6ad6cbe833bbc4e37ba2.tar.xz
pbs2-52304b789d93e1745c0f6ad6cbe833bbc4e37ba2.zip
ACHTUNG: Habe in einigen Mappern die find() Methode geändert, sie liefern jetzt ein Object des Models zurück und nehmen als Parameter die ID! (Group, Config, Membership, Person, u.a.) || Alle Controller soweit fertig
Diffstat (limited to 'application/forms/ConfigCreate.php')
-rw-r--r--application/forms/ConfigCreate.php29
1 files changed, 20 insertions, 9 deletions
diff --git a/application/forms/ConfigCreate.php b/application/forms/ConfigCreate.php
index 705fd62..3aa142c 100644
--- a/application/forms/ConfigCreate.php
+++ b/application/forms/ConfigCreate.php
@@ -3,6 +3,13 @@
class Application_Form_ConfigCreate extends Zend_Form
{
+ private $grouplist;
+
+ public function setGrouplist($grouplist){
+ $this->grouplist = $grouplist;
+
+ }
+
public function init()
{
$this->setName("ConfigCreate");
@@ -17,15 +24,17 @@ class Application_Form_ConfigCreate 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 +42,8 @@ class Application_Form_ConfigCreate extends Zend_Form
array('StringLength', false, array(0, 50)),
),
'required' => true,
+ 'rows' => 10,
+ 'cols' => 70,
'label' => 'Shellscript:',
));