From 28317cb90e3ba13aa5a946f24eabf027fa78cf6b Mon Sep 17 00:00:00 2001 From: michael pereira Date: Wed, 16 Mar 2011 13:01:41 +0100 Subject: Default KCL wird jetzt automatisch geupdated --- .../modules/dev/controllers/ErrorController.php | 2 +- .../modules/dev/forms/BootmenuEntriesAdd.php | 21 +++++++++++++++++++++ .../modules/dev/forms/BootmenuEntriesEdit.php | 19 +++++++++++++++++++ .../modules/dev/views/scripts/bootmenu/index.phtml | 3 ++- 4 files changed, 43 insertions(+), 2 deletions(-) (limited to 'application/modules/dev') diff --git a/application/modules/dev/controllers/ErrorController.php b/application/modules/dev/controllers/ErrorController.php index 189614b..f317494 100644 --- a/application/modules/dev/controllers/ErrorController.php +++ b/application/modules/dev/controllers/ErrorController.php @@ -6,7 +6,6 @@ class dev_ErrorController extends Zend_Controller_Action public function errorAction() { $errors = $this->_getParam('error_handler'); - switch ($errors->type) { case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE: case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER: @@ -21,6 +20,7 @@ class dev_ErrorController extends Zend_Controller_Action // application error $this->getResponse()->setHttpResponseCode(500); $this->view->message = 'Application error'; + print_a($errors); break; } diff --git a/application/modules/dev/forms/BootmenuEntriesAdd.php b/application/modules/dev/forms/BootmenuEntriesAdd.php index 2e1b677..ef6e909 100644 --- a/application/modules/dev/forms/BootmenuEntriesAdd.php +++ b/application/modules/dev/forms/BootmenuEntriesAdd.php @@ -54,6 +54,12 @@ class dev_Form_BootmenuEntriesAdd extends Zend_Form $this->addElement($bootosfield); + $kclactive = $this->createElement('checkbox','kclactive'); + #$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( @@ -63,10 +69,25 @@ class dev_Form_BootmenuEntriesAdd extends Zend_Form 'cols' => 50, 'rows' => 5, 'label' => 'KCL:', + 'readOnly' => true, 'value' => $this->bootoslist[$_POST['bootosID']]->getDefaultkcl() )); + + + $this->addElement('textarea', 'kclappend', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => false, + 'cols' => 50, + 'rows' => 5, + 'label' => 'KCL-Append:' + + )); + $defaultconfigid = $this->bootoslist[$_POST['bootosID']]->getConfigID(); $configfield = $this->createElement('select','configID'); $configfield->setLabel('Config:'); diff --git a/application/modules/dev/forms/BootmenuEntriesEdit.php b/application/modules/dev/forms/BootmenuEntriesEdit.php index 57aa053..394563e 100644 --- a/application/modules/dev/forms/BootmenuEntriesEdit.php +++ b/application/modules/dev/forms/BootmenuEntriesEdit.php @@ -55,6 +55,12 @@ class dev_Form_BootmenuEntriesEdit extends Zend_Form $bootosfield->setRegisterInArrayValidator(false); $this->addElement($bootosfield); + $kclactive = $this->createElement('checkbox','kclactive'); + #$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( @@ -64,9 +70,22 @@ class dev_Form_BootmenuEntriesEdit extends Zend_Form 'cols' => 50, 'rows' => 5, 'label' => 'KCL:', + 'readOnly' => true, 'value' => $this->bootoslist[$_POST['bootosID']]->getDefaultkcl() )); + $this->addElement('textarea', 'kclappend', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => false, + 'cols' => 50, + 'rows' => 5, + 'label' => 'KCL-Append:' + + )); + $defaultconfigid = $this->bootoslist[$_POST['bootosID']]->getConfigID(); $configfield = $this->createElement('select','configID'); $configfield->setLabel('Config:'); diff --git a/application/modules/dev/views/scripts/bootmenu/index.phtml b/application/modules/dev/views/scripts/bootmenu/index.phtml index c42a09a..d321758 100644 --- a/application/modules/dev/views/scripts/bootmenu/index.phtml +++ b/application/modules/dev/views/scripts/bootmenu/index.phtml @@ -64,7 +64,7 @@