From 52304b789d93e1745c0f6ad6cbe833bbc4e37ba2 Mon Sep 17 00:00:00 2001 From: michael pereira Date: Wed, 9 Mar 2011 11:55:55 +0100 Subject: 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 --- application/forms/BootisoEdit.php | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'application/forms/BootisoEdit.php') diff --git a/application/forms/BootisoEdit.php b/application/forms/BootisoEdit.php index 7418a17..174f109 100644 --- a/application/forms/BootisoEdit.php +++ b/application/forms/BootisoEdit.php @@ -2,6 +2,14 @@ class Application_Form_BootisoEdit extends Zend_Form { + + private $grouplist; + + public function setGrouplist($grouplist){ + $this->grouplist = $grouplist; + + } + public function init() { $this->setName("BootIsoEdit"); @@ -16,15 +24,17 @@ class Application_Form_BootisoEdit 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('text', 'path', array( 'filters' => array('StringTrim'), -- cgit v1.2.3-55-g7522