summaryrefslogtreecommitdiffstats
path: root/application/modules/user
diff options
context:
space:
mode:
authormichael pereira2011-04-08 15:20:51 +0200
committermichael pereira2011-04-08 15:20:51 +0200
commitb219a289b07928d832755447f54ca3f9b3fd2b4b (patch)
tree86e0528001ae4f6423adf8a88410233f2d6d0e98 /application/modules/user
parentdefaultbootmenu fertig (diff)
downloadpbs2-b219a289b07928d832755447f54ca3f9b3fd2b4b.tar.gz
pbs2-b219a289b07928d832755447f54ca3f9b3fd2b4b.tar.xz
pbs2-b219a289b07928d832755447f54ca3f9b3fd2b4b.zip
kcl gefixt
Diffstat (limited to 'application/modules/user')
-rw-r--r--application/modules/user/controllers/BootmenuController.php9
-rw-r--r--application/modules/user/forms/BootmenuEntries.php17
2 files changed, 14 insertions, 12 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;