summaryrefslogtreecommitdiffstats
path: root/application/forms/BootosCreate.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/forms/BootosCreate.php')
-rw-r--r--application/forms/BootosCreate.php59
1 files changed, 41 insertions, 18 deletions
diff --git a/application/forms/BootosCreate.php b/application/forms/BootosCreate.php
index a9648e4..a6d74c6 100644
--- a/application/forms/BootosCreate.php
+++ b/application/forms/BootosCreate.php
@@ -3,6 +3,19 @@
class Application_Form_BootosCreate 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("BootOsCreate");
@@ -18,24 +31,27 @@ class Application_Form_BootosCreate extends Zend_Form
));
- $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'),
@@ -43,6 +59,7 @@ class Application_Form_BootosCreate extends Zend_Form
array('StringLength', false, array(0, 50)),
),
'required' => true,
+ 'size' => 50,
'label' => 'Init-Path:',
));
@@ -52,15 +69,18 @@ class Application_Form_BootosCreate 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:',
));
@@ -70,6 +90,8 @@ class Application_Form_BootosCreate extends Zend_Form
array('StringLength', false, array(0, 50)),
),
'required' => false,
+ 'rows' => 5,
+ 'cols' => 50,
'label' => 'Description:',
));
@@ -93,6 +115,7 @@ class Application_Form_BootosCreate extends Zend_Form
),
'required' => true,
'label' => 'Public-Level:',
+ 'value' => '0',
));
$this->addElement('submit', 'createbootos', array(