diff options
Diffstat (limited to 'application/modules/user/controllers/PrebootController.php')
| -rw-r--r-- | application/modules/user/controllers/PrebootController.php | 13 |
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)) { |
