diff options
| author | michael pereira | 2011-03-09 11:55:55 +0100 |
|---|---|---|
| committer | michael pereira | 2011-03-09 11:55:55 +0100 |
| commit | 52304b789d93e1745c0f6ad6cbe833bbc4e37ba2 (patch) | |
| tree | df3ef4566129c4f1cdb3fc5410093c2b83900993 /application/forms/BootosEdit.php | |
| parent | Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff) | |
| download | pbs2-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/BootosEdit.php')
| -rw-r--r-- | application/forms/BootosEdit.php | 59 |
1 files changed, 41 insertions, 18 deletions
diff --git a/application/forms/BootosEdit.php b/application/forms/BootosEdit.php index 89edf79..572e712 100644 --- a/application/forms/BootosEdit.php +++ b/application/forms/BootosEdit.php @@ -3,6 +3,19 @@ class Application_Form_BootosEdit extends Zend_Form { + private $grouplist; + private $configlist; + + public function setGrouplist($grouplist){ + $this->grouplist = $grouplist; + + } + + public function setConfiglist($configlist){ + $this->configlist = $configlist; + + } + public function init() { $this->setName("BootOsEdit"); @@ -26,24 +39,27 @@ class Application_Form_BootosEdit extends Zend_Form 'label' => 'Title:', )); - $this->addElement('text', 'configID', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'required' => false, - 'label' => 'ConfigID:', - )); + $configfield = $this->createElement('select','configID'); + $configfield ->setLabel('Config:'); + + if(count($this->configlist)>0){ + foreach($this->configlist as $config => $c){ + $configfield->addMultiOption($c->getID(), $c->getTitle()); + } + } + $configfield->setRegisterInArrayValidator(false); + $this->addElement($configfield); - $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_init', array( 'filters' => array('StringTrim'), @@ -51,6 +67,7 @@ class Application_Form_BootosEdit extends Zend_Form array('StringLength', false, array(0, 50)), ), 'required' => true, + 'size' => 50, 'label' => 'Init-Path:', )); @@ -60,15 +77,18 @@ class Application_Form_BootosEdit extends Zend_Form array('StringLength', false, array(0, 50)), ), 'required' => true, + 'size' => 50, 'label' => 'Kernel-Path:', )); - $this->addElement('text', 'defaultkcl', array( + $this->addElement('textarea', 'defaultkcl', array( 'filters' => array('StringTrim'), 'validators' => array( array('StringLength', false, array(0, 50)), ), 'required' => true, + 'rows' => 5, + 'cols' => 50, 'label' => 'Default-KCL:', )); @@ -78,6 +98,8 @@ class Application_Form_BootosEdit extends Zend_Form array('StringLength', false, array(0, 50)), ), 'required' => false, + 'rows' => 5, + 'cols' => 50, 'label' => 'Description:', )); @@ -101,6 +123,7 @@ class Application_Form_BootosEdit extends Zend_Form ), 'required' => true, 'label' => 'Public-Level:', + 'value' => '0', )); $this->addElement('submit', 'editbootos', array( |
