summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/modules/user/controllers/BootmenuController.php9
-rw-r--r--application/modules/user/forms/BootmenuEntries.php17
-rw-r--r--pbs-newdata.sql14
-rw-r--r--pbs.sql2
4 files changed, 22 insertions, 20 deletions
diff --git a/application/modules/user/controllers/BootmenuController.php b/application/modules/user/controllers/BootmenuController.php
index a79a770..1ad2997 100644
--- a/application/modules/user/controllers/BootmenuController.php
+++ b/application/modules/user/controllers/BootmenuController.php
@@ -320,11 +320,12 @@ class user_BootmenuController extends Zend_Controller_Action
'maxorder'=> $maxorder,
'configlist'=> $configlist,
'page' => $this->page,
- 'action' => 'addbootmenuentry'
+ 'action' => 'addbootmenuentry',
+ 'kcl' => $_POST['kcl']
));
$bootmenuentryForm->populate(array('order' => $maxorder));
- unset($_POST['kcl']);
+ unset($_POST['defaultkcl']);
unset($_POST['configID']);
$bootmenuentryForm->populate($_POST);
@@ -336,7 +337,9 @@ class user_BootmenuController extends Zend_Controller_Action
'maxorder'=> $maxorder,
'configlist'=>$configlist,
'page' => $this->page,
- 'action' => 'addbootmenuentry'),$_POST);
+ 'action' => 'addbootmenuentry',
+ 'kcl' => $_POST['kcl']
+ ),$_POST);
if ($bootmenuentryForm->isValid($_POST)) {
diff --git a/application/modules/user/forms/BootmenuEntries.php b/application/modules/user/forms/BootmenuEntries.php
index b897974..5be1b59 100644
--- a/application/modules/user/forms/BootmenuEntries.php
+++ b/application/modules/user/forms/BootmenuEntries.php
@@ -47,10 +47,9 @@ class user_Form_BootmenuEntries extends Zend_Form
@list($key) = array_keys($this->bootoslist);
$firstbootos = $this->bootoslist[$key];
$_POST['bootosID'] = $firstbootos->getID();
- if(isset($this->kcl))
- $_POST['kclactive'] = true;
- else
- $_POST['kclactive'] = false;
+
+ if(!isset($this->kcl))
+ $this->kcl = true;
}
$this->setName($this->action);
@@ -78,15 +77,15 @@ class user_Form_BootmenuEntries extends Zend_Form
$bootosfield->setRegisterInArrayValidator(false);
$this->addElement($bootosfield);
- $kclactive = $this->createElement('checkbox','kclactive');
+ $kclactive = $this->createElement('checkbox','kcl');
$kclactive->setAttrib('onChange', "document.getElementById('".$this->action."').submit();");
$kclactive->setLabel('Use default KCL:');
- $kclactive->setValue($_POST['kclactive']);
+ $kclactive->setValue($this->kcl);
$this->addElement($kclactive);
- if($_POST['kclactive']){
- $this->addElement('textarea', 'kcl', array(
+ if($this->kcl){
+ $this->addElement('textarea', 'defaultkcl', array(
'filters' => array('StringTrim'),
'validators' => array(
array('StringLength', false, array(0, 50)),
@@ -101,7 +100,7 @@ class user_Form_BootmenuEntries extends Zend_Form
));
}
- if($_POST['kclactive'])
+ if($this->kcl)
$kcllength = 175 - strlen($this->bootoslist[$_POST['bootosID']]->getDefaultkcl());
else
$kcllength = 175;
diff --git a/pbs-newdata.sql b/pbs-newdata.sql
index 0954204..ea67ecf 100644
--- a/pbs-newdata.sql
+++ b/pbs-newdata.sql
@@ -121,13 +121,13 @@ INSERT INTO `pbs_bootmenu` (`bootmenuID`, `membershipID`, `groupID`, `title`, `c
-- Adding BootOs to BootMenus
INSERT INTO `pbs_bootmenuentries` (`bootmenuentriesID`, `bootosID`, `bootmenuID`, `title`, `kcl`, `kclappend`, `configID`, `order`) VALUES
-(1, 5, 1, '123', 'default kcl 5', 'abc', 1, 0),
-(2, 2, 1, 'menu2', 'default kcl 2', '123456', 1, 1),
-(3, 6, 1, 'Mein OS 6', 'default kcl 6', 'appending', 1, 2),
-(4, 10, 2, 'Das OS 10', 'default kcl 10', 'append', 1, 0),
-(5, 9, 5, 'Bootos 9', 'default kcl 9', 'a', 1, 0),
-(6, 1, 4, 'booting 1', 'default kcl 1', 'aphabeta', 1, 0),
-(7, 6, 3, 'blablabla', 'default kcl 6', '11', 1, 0);
+(1, 5, 1, '123', '1', 'abc', 1, 0),
+(2, 2, 1, 'menu2', '0', '123456', 1, 1),
+(3, 6, 1, 'Mein OS 6', '1', 'appending', 1, 2),
+(4, 10, 2, 'Das OS 10', '1', 'append', 1, 0),
+(5, 9, 5, 'Bootos 9', '1', 'a', 1, 0),
+(6, 1, 4, 'booting 1', '0', 'aphabeta', 1, 0),
+(7, 6, 3, 'blablabla', '0', '11', 1, 0);
-- Adding client to pools (poolentries)
INSERT INTO `pbs_poolentries` (`poolentriesID`, `poolID`, `clientID`) VALUES
diff --git a/pbs.sql b/pbs.sql
index f2f2b30..69a5b5e 100644
--- a/pbs.sql
+++ b/pbs.sql
@@ -176,7 +176,7 @@ CREATE TABLE IF NOT EXISTS `pbs_bootmenuentries` (
`bootosID` int(11) NOT NULL,
`bootmenuID` int(11) NOT NULL,
`title` varchar(30) NOT NULL,
- `kcl` varchar(255),
+ `kcl` tinyint(1) NOT NULL,
`kclappend` varchar(255),
`configID` int(11),
`order` int(11) NOT NULL,