summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/controllers/ErrorController.php1
-rw-r--r--application/models/BootMenuEntries.php10
-rw-r--r--application/models/BootMenuEntriesMapper.php6
-rw-r--r--application/modules/dev/controllers/ErrorController.php2
-rw-r--r--application/modules/dev/forms/BootmenuEntriesAdd.php21
-rw-r--r--application/modules/dev/forms/BootmenuEntriesEdit.php19
-rw-r--r--application/modules/dev/views/scripts/bootmenu/index.phtml3
7 files changed, 57 insertions, 5 deletions
diff --git a/application/controllers/ErrorController.php b/application/controllers/ErrorController.php
index 01ee79b..b081709 100644
--- a/application/controllers/ErrorController.php
+++ b/application/controllers/ErrorController.php
@@ -21,6 +21,7 @@ class ErrorController extends Zend_Controller_Action
// application error
$this->getResponse()->setHttpResponseCode(500);
$this->view->message = 'Application error';
+ print_a($errors);
break;
}
diff --git a/application/models/BootMenuEntries.php b/application/models/BootMenuEntries.php
index ec42507..c20c2d0 100644
--- a/application/models/BootMenuEntries.php
+++ b/application/models/BootMenuEntries.php
@@ -7,6 +7,7 @@ class Application_Model_BootMenuEntries
protected $_bootmenuID;
protected $_title;
protected $_kcl;
+ protected $_kclappend;
protected $_configID;
protected $_order;
@@ -91,6 +92,15 @@ class Application_Model_BootMenuEntries
$this->_kcl = $_kcl;
return $this;
}
+ public function getKclappend()
+ {
+ return $this->_kclappend;
+ }
+ public function setKclappend($_kclappend)
+ {
+ $this->_kclappend = $_kclappend;
+ return $this;
+ }
public function getConfigID()
{
return $this->_configID;
diff --git a/application/models/BootMenuEntriesMapper.php b/application/models/BootMenuEntriesMapper.php
index accb8ff..7a3759f 100644
--- a/application/models/BootMenuEntriesMapper.php
+++ b/application/models/BootMenuEntriesMapper.php
@@ -76,7 +76,7 @@ class Application_Model_BootMenuEntriesMapper
public function save(Application_Model_BootMenuEntries $botmenuentries)
{
- $data = array('bootmenuentriesID' => $botmenuentries->getID(), 'bootosID'=> $botmenuentries->getBootosID() ,'bootmenuID'=> $botmenuentries->getBootmenuID() ,'configID'=> $botmenuentries->getConfigID() ,'title'=> $botmenuentries->getTitle() ,'kcl'=> $botmenuentries->getKcl() ,'order'=> $botmenuentries->getOrder() );
+ $data = array('bootmenuentriesID' => $botmenuentries->getID(), 'bootosID'=> $botmenuentries->getBootosID() ,'bootmenuID'=> $botmenuentries->getBootmenuID() ,'configID'=> $botmenuentries->getConfigID() ,'title'=> $botmenuentries->getTitle() ,'kcl'=> $botmenuentries->getKcl(),'kclappend'=> $botmenuentries->getKclappend() ,'order'=> $botmenuentries->getOrder() );
if (null === ($id = $botmenuentries->getID()) ) {
unset($data['bootmenuentriesID']);
@@ -130,7 +130,7 @@ class Application_Model_BootMenuEntriesMapper
$row = $result->current();
- $botmenuentries->setID($row->bootmenuentriesID)->setBootosID($row->bootosID)->setBootmenuID($row->bootmenuID)->setTitle($row->title)->setConfigID($row->configID)->setKcl($row->kcl)->setOrder($row->order);
+ $botmenuentries->setID($row->bootmenuentriesID)->setBootosID($row->bootosID)->setBootmenuID($row->bootmenuID)->setTitle($row->title)->setConfigID($row->configID)->setKclappend($row->kclappend)->setOrder($row->order);
}
@@ -140,7 +140,7 @@ class Application_Model_BootMenuEntriesMapper
$entries = array();
foreach ($resultSet as $row) {
$entry = new Application_Model_BootMenuEntries();
- $entry->setID($row->bootmenuentriesID)->setBootosID($row->bootosID)->setBootmenuID($row->bootmenuID)->setTitle($row->title)->setConfigID($row->configID)->setKcl($row->kcl)->setOrder($row->order);
+ $entry->setID($row->bootmenuentriesID)->setBootosID($row->bootosID)->setBootmenuID($row->bootmenuID)->setTitle($row->title)->setConfigID($row->configID)->setKcl($row->kcl)->setKclappend($row->kclappend)->setOrder($row->order);
$entries[] = $entry;
}
return $entries;
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 @@
<!-- <th>BootmenuID</th>-->
<th>BootOS</th>
<th>kcl</th>
-
+ <th>kclappend</th>
<th>Config</th>
<th>Position</th>
<th colspan=2>Actions</th>
@@ -93,6 +93,7 @@
<!--<td><?php echo $this->escape($bootmenuentry->getBootmenuID()); ?></td>
--><td><?php echo "[".$this->escape($bootmenuentry->getBootosID()."] ". $bootos->getTitle()); ?></td>
<td><?php echo $this->escape($bootmenuentry->getkcl()); ?></td>
+ <td><?php echo $this->escape($bootmenuentry->getkclappend()); ?></td>
<td><?php echo "[".$this->escape($bootmenuentry->getConfigID()."] ". $config->getTitle()); ?></td>
<td><?php echo $this->escape($bootmenuentry->getOrder() + 1); ?></td>
<td class='action'><a href="<?php echo $this->url(