summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers
diff options
context:
space:
mode:
authorMichael Neves2012-01-26 17:58:53 +0100
committerMichael Neves2012-01-26 17:58:53 +0100
commit08e59ba66fd7281f74d053461043855f06aa4e01 (patch)
treef5afa981f0c1471b30adacb46cbe6e96d2ea5883 /application/modules/user/controllers
parentBootiso and Preboot Model fix (diff)
downloadpbs2-08e59ba66fd7281f74d053461043855f06aa4e01.tar.gz
pbs2-08e59ba66fd7281f74d053461043855f06aa4e01.tar.xz
pbs2-08e59ba66fd7281f74d053461043855f06aa4e01.zip
Preboot add/edit
Diffstat (limited to 'application/modules/user/controllers')
-rw-r--r--application/modules/user/controllers/PrebootController.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/application/modules/user/controllers/PrebootController.php b/application/modules/user/controllers/PrebootController.php
index 4f83820..a22ae18 100644
--- a/application/modules/user/controllers/PrebootController.php
+++ b/application/modules/user/controllers/PrebootController.php
@@ -104,14 +104,19 @@ class User_PrebootController extends Zend_Controller_Action {
if(!Pbs_Acl::checkRight('prc'))
{ $this->_redirect('/user/preboot/index/page/'.$this->page.'/addresult/forbidden'); }
+ $preboottypeMapper = new Application_Model_PreBootTypeMapper();
+ $preboottype = $preboottypeMapper->fetchAll();
+
if (!isset($_POST["createpreboot"])) {
$prebootForm = new user_Form_Preboot(array(
'action' => 'createpreboot',
+ 'preboottype' => $preboottype,
'page' => $this->page));
} else {
$prebootForm = new user_Form_Preboot(array(
'action' => 'createpreboot',
+ 'preboottype' => $preboottype,
'page' => $this->page), $_POST);
if ($prebootForm->isValid($_POST)) {
@@ -171,10 +176,17 @@ class User_PrebootController extends Zend_Controller_Action {
if($this->membership->getGroupID() != $preboot->getGroupID())
{ $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/forbidden'); }
+ $preboottypeMapper = new Application_Model_PreBootTypeMapper();
+ $preboottype = $preboottypeMapper->fetchAll();
+
if (!isset($_POST["editpreboot"])) {
+ if(!isset($_POST['preboottypeID'])) {
+ $_POST['preboottypeID'] = $preboot->getPreboottypeID();
+ }
$prebootForm = new user_Form_Preboot(array(
'action' => 'editpreboot',
+ 'preboottype' => $preboottype,
'page' => $this->page));
$prebootForm->populate($preboot->toArray());
@@ -182,6 +194,7 @@ class User_PrebootController extends Zend_Controller_Action {
$prebootForm = new user_Form_Preboot(array(
'action' => 'editpreboot',
+ 'preboottype' => $preboottype,
'page' => $this->page), $_POST);
if ($prebootForm->isValid($_POST)) {