summaryrefslogtreecommitdiffstats
path: root/application/modules/dev/forms/BootisoCreate.php
diff options
context:
space:
mode:
authormichael pereira2011-03-21 10:49:32 +0100
committermichael pereira2011-03-21 10:49:32 +0100
commit19d1af16ad8a2fdaa5aa608693b81fa9502e162d (patch)
treeb5b00a6fb91fffad157b85bbf209ac7675a86801 /application/modules/dev/forms/BootisoCreate.php
parentFilter funktioniert nun, FBGui IndexController angepasst (diff)
downloadpbs2-19d1af16ad8a2fdaa5aa608693b81fa9502e162d.tar.gz
pbs2-19d1af16ad8a2fdaa5aa608693b81fa9502e162d.tar.xz
pbs2-19d1af16ad8a2fdaa5aa608693b81fa9502e162d.zip
Preboot Controller eingerichtet
Diffstat (limited to 'application/modules/dev/forms/BootisoCreate.php')
-rw-r--r--application/modules/dev/forms/BootisoCreate.php35
1 files changed, 25 insertions, 10 deletions
diff --git a/application/modules/dev/forms/BootisoCreate.php b/application/modules/dev/forms/BootisoCreate.php
index 2ecc2d2..097d781 100644
--- a/application/modules/dev/forms/BootisoCreate.php
+++ b/application/modules/dev/forms/BootisoCreate.php
@@ -4,11 +4,17 @@ class dev_Form_BootisoCreate extends Zend_Form
{
private $grouplist;
+ private $prebootlist;
public function setGrouplist($grouplist){
$this->grouplist = $grouplist;
}
+ public function setPrebootlist($prebootlist){
+ $this->prebootlist = $prebootlist;
+
+ }
+
public function init()
{
@@ -35,15 +41,20 @@ class dev_Form_BootisoCreate extends Zend_Form
$groupfield->setRegisterInArrayValidator(false);
$this->addElement($groupfield);
- $this->addElement('text', 'path_fbgui', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'size' => 50,
- 'label' => 'Path to FbGui:',
- ));
+ $prebootfield = $this->createElement('select','prebootID');
+ $prebootfield ->setLabel('Preboot:');
+
+ if(count($this->prebootlist)>0){
+ foreach($this->prebootlist as $preboot => $p){
+ $prebootfield->addMultiOption($p->getID(), $p->getTitle());
+ }
+ }
+ $prebootfield->setRegisterInArrayValidator(false);
+ $this->addElement($prebootfield);
+
+ $serial = time();
+ for($i=2; $i<14; $i+=3)
+ $serial = substr($serial,0,$i) .'-'. substr($serial,$i,strlen($serial));
$this->addElement('text', 'serialnumber', array(
'filters' => array('StringTrim'),
@@ -53,7 +64,11 @@ class dev_Form_BootisoCreate extends Zend_Form
'required' => true,
'size' => 50,
'label' => 'Serialnumber:',
+ 'value' => $serial
));
+
+
+
$date = new DateTime();
$date->add(new DateInterval('P1Y'));
@@ -84,7 +99,7 @@ class dev_Form_BootisoCreate extends Zend_Form
));
$this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/bootiso"'
+ 'onclick' => 'self.location="/dev/bootiso"'
));
}