summaryrefslogtreecommitdiffstats
path: root/application/controllers/SessionController.php
diff options
context:
space:
mode:
authorSimon2011-03-11 10:00:40 +0100
committerSimon2011-03-11 10:00:40 +0100
commitabda64d32457744695f91a20feafde3431f9e9e2 (patch)
tree3ceac1af1fb7ebd2a1c8fcfce278d3ded9f3d1e4 /application/controllers/SessionController.php
parentFilterController fixes (diff)
downloadpbs2-abda64d32457744695f91a20feafde3431f9e9e2.tar.gz
pbs2-abda64d32457744695f91a20feafde3431f9e9e2.tar.xz
pbs2-abda64d32457744695f91a20feafde3431f9e9e2.zip
AddClientToPool über Formular gefixxt, Buttonbeschriftungen anhand der Action beschriftet
Diffstat (limited to 'application/controllers/SessionController.php')
-rw-r--r--application/controllers/SessionController.php12
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);