diff options
Diffstat (limited to 'application/controllers/SessionController.php')
| -rw-r--r-- | application/controllers/SessionController.php | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/application/controllers/SessionController.php b/application/controllers/SessionController.php index 09eadc9..6d0a873 100644 --- a/application/controllers/SessionController.php +++ b/application/controllers/SessionController.php @@ -26,11 +26,11 @@ class SessionController extends Zend_Controller_Action $bootisos = $bi->fetchAll(); if (!isset($_POST["add"])){ - $createsession = new Application_Form_Session(array('clients'=>$clients,'bootos'=>$bootos,'bootisos'=>$bootisos)); + $createsession = new Application_Form_Session(array('buttontext' => 'Create Session','clients'=>$clients,'bootos'=>$bootos,'bootisos'=>$bootisos)); $this->view->createsession = $createsession; }else { // TODO extend with normal function not only with post - $createsession = new Application_Form_Session(array('clients'=>$clients,'bootos'=>$bootos,'bootisos'=>$bootisos),$_POST); + $createsession = new Application_Form_Session(array('buttontext' => 'Create Session','clients'=>$clients,'bootos'=>$bootos,'bootisos'=>$bootisos),$_POST); print_a($_POST); if ($createsession->isValid($_POST)) { try{ @@ -49,9 +49,7 @@ class SessionController extends Zend_Controller_Action }catch (Zend_Exception $e) { echo "Error message 2: " . $e->getMessage() . "\n"; - } - print_a('saved'); - #$this->_redirect('/session'); + } } $this->view->createsession = $createsession; } @@ -78,7 +76,7 @@ class SessionController extends Zend_Controller_Action $session->setTime(date('d.m.Y H:i',$session->getTime())); $session2 = $session->toArray(); - $editsession = new Application_Form_Session(array('clients'=>$clients,'bootos'=>$bootos,'bootisos'=>$bootisos)); + $editsession = new Application_Form_Session(array('buttontext' => 'Edit Session','clients'=>$clients,'bootos'=>$bootos,'bootisos'=>$bootisos)); $editsession->populate($session2); $this->view->editsession = $editsession; @@ -86,7 +84,7 @@ class SessionController extends Zend_Controller_Action try{ $sessionID = $this->_request->getParam('sessionID'); - $editsession = new Application_Form_Session(array('clients'=>$clients,'bootos'=>$bootos,'bootisos'=>$bootisos),$_POST); + $editsession = new Application_Form_Session(array('buttontext' => 'Edit Session','clients'=>$clients,'bootos'=>$bootos,'bootisos'=>$bootisos),$_POST); if ($editsession->isValid($_POST)) { $session = new Application_Model_Session($_POST); |
