summaryrefslogtreecommitdiffstats
path: root/application/modules/dev/forms/BootmenuEntriesAdd.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/dev/forms/BootmenuEntriesAdd.php')
-rw-r--r--application/modules/dev/forms/BootmenuEntriesAdd.php35
1 files changed, 19 insertions, 16 deletions
diff --git a/application/modules/dev/forms/BootmenuEntriesAdd.php b/application/modules/dev/forms/BootmenuEntriesAdd.php
index ef6e909..e849e2d 100644
--- a/application/modules/dev/forms/BootmenuEntriesAdd.php
+++ b/application/modules/dev/forms/BootmenuEntriesAdd.php
@@ -27,6 +27,7 @@ class dev_Form_BootmenuEntriesAdd extends Zend_Form
if(!isset($_POST['bootosID'])){
$firstbootos = array_slice($this->bootoslist,0,1);
$_POST['bootosID'] = $firstbootos[0]->getID();
+ $_POST['kclactive'] = true;
}
$this->setName("BootMenuEntryAdd");
@@ -52,28 +53,30 @@ class dev_Form_BootmenuEntriesAdd extends Zend_Form
}
$bootosfield->setRegisterInArrayValidator(false);
- $this->addElement($bootosfield);
+ $this->addElement($bootosfield);
$kclactive = $this->createElement('checkbox','kclactive');
- #$kclactive->setAttrib('onChange', "document.getElementById('BootMenuEntryAdd').submit();");
+ $kclactive->setAttrib('onChange', "document.getElementById('BootMenuEntryAdd').submit();");
$kclactive->setLabel('Use default KCL:');
$kclactive->setValue(true);
$this->addElement($kclactive);
- $this->addElement('textarea', 'kcl', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'cols' => 50,
- 'rows' => 5,
- 'label' => 'KCL:',
- 'readOnly' => true,
- 'value' => $this->bootoslist[$_POST['bootosID']]->getDefaultkcl()
-
- ));
+ if($_POST['kclactive']){
+ $this->addElement('textarea', 'kcl', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => false,
+ 'cols' => 50,
+ 'rows' => 5,
+ 'label' => 'KCL:',
+ 'readOnly' => true,
+ 'value' => $this->bootoslist[$_POST['bootosID']]->getDefaultkcl()
+
+ ));
+ }
$this->addElement('textarea', 'kclappend', array(
@@ -119,7 +122,7 @@ class dev_Form_BootmenuEntriesAdd extends Zend_Form
));
$this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/bootmenu"'
+ 'onclick' => 'self.location="/dev/bootmenu"'
));
}