diff options
| author | michael pereira | 2011-03-16 16:35:15 +0100 |
|---|---|---|
| committer | michael pereira | 2011-03-16 16:35:15 +0100 |
| commit | 26deb7a640aea0653dae33f9b9d36f552b58c07d (patch) | |
| tree | 3d8c62cdd4906322cf518e618479b061ccf41e8d /application/modules/dev/forms/BootmenuEntriesAdd.php | |
| parent | Default KCL wird jetzt automatisch geupdated (diff) | |
| download | pbs2-26deb7a640aea0653dae33f9b9d36f552b58c07d.tar.gz pbs2-26deb7a640aea0653dae33f9b9d36f552b58c07d.tar.xz pbs2-26deb7a640aea0653dae33f9b9d36f552b58c07d.zip | |
KCLAppend hinzugefuegt, KCL fertig :-)
Diffstat (limited to 'application/modules/dev/forms/BootmenuEntriesAdd.php')
| -rw-r--r-- | application/modules/dev/forms/BootmenuEntriesAdd.php | 35 |
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"' )); } |
