diff options
| author | Simon | 2011-03-31 17:41:18 +0200 |
|---|---|---|
| committer | Simon | 2011-03-31 17:41:18 +0200 |
| commit | 173214565587a28da9a851ba1130d6fcc542f912 (patch) | |
| tree | 78b4d2e23efa5c703e3e073fc5325fab90e19314 /application/modules/user/controllers/PoolController.php | |
| parent | pagination auf client, pool und filter hinzugefügt (diff) | |
| download | pbs2-173214565587a28da9a851ba1130d6fcc542f912.tar.gz pbs2-173214565587a28da9a851ba1130d6fcc542f912.tar.xz pbs2-173214565587a28da9a851ba1130d6fcc542f912.zip | |
Pagination - Rücksprung von formular auf richtige Seite
Diffstat (limited to 'application/modules/user/controllers/PoolController.php')
| -rw-r--r-- | application/modules/user/controllers/PoolController.php | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/application/modules/user/controllers/PoolController.php b/application/modules/user/controllers/PoolController.php index 01bf761..5584b85 100644 --- a/application/modules/user/controllers/PoolController.php +++ b/application/modules/user/controllers/PoolController.php @@ -100,12 +100,16 @@ class User_PoolController extends Zend_Controller_Action // ACL: is he allowed to create a pool? if(!Pbs_Acl::checkRight('poc')) $this->_redirect('/user'); - + + $page = $this->_request->getParam('page'); + if (!isset($_POST["add"])){ - $addfilterform = new user_Form_Pool(array('buttontext' => 'Create Pool')); + $addfilterform = new user_Form_Pool(array('buttontext' => 'Create Pool')); + $addfilterform->setPage($page); $this->view->addpool = $addfilterform; }else { - $addpoolform = new user_Form_Pool(array('buttontext' => 'Create Pool'),$_POST); + $addpoolform = new user_Form_Pool(array('buttontext' => 'Create Pool'),$_POST); + $addpoolform->setPage($page); if ($addpoolform->isValid($_POST)) { try{ $pool = new Application_Model_Pool($_POST); @@ -154,15 +158,16 @@ class User_PoolController extends Zend_Controller_Action if(!Pbs_Acl::checkRight('poe')) $this->_redirect('/user'); + $page = $this->_request->getParam('page'); if (!isset($_POST["add"])){ - $poolID = $this->_request->getParam('poolID'); - $page = $this->_request->getParam('page'); + $poolID = $this->_request->getParam('poolID'); $pool = new Application_Model_Pool(); $poolmapper = new Application_Model_PoolMapper(); $poolmapper->find($poolID,$pool); if($pool->getGroupID() == $this->membership->getGroupID()){ $poolArray = $pool->toArray(); $editpool = new user_Form_Pool(array('buttontext' => 'Edit Pool')); + $editpool->setPage($page); $editpool->populate($poolArray); $this->view->editpool = $editpool; } @@ -171,6 +176,7 @@ class User_PoolController extends Zend_Controller_Action } }else { $editpoolform = new user_Form_Pool(array('buttontext' => 'Edit Pool'),$_POST); + $editpoolform->setPage($page); if ($editpoolform->isValid($_POST)) { try{ $poolmapper = new Application_Model_PoolMapper(); @@ -219,9 +225,11 @@ class User_PoolController extends Zend_Controller_Action $freeclients = $this->arrayDiff($clients,$assignedclientsArray); $poolclient = new user_Form_PoolClient(array('buttontext' => 'Link Client','clients'=> $freeclients)); + $poolclient->setPage($page); $this->view->poolclient = $poolclient; }else { - $poolclient = new dev_Form_PoolClient(array('buttontext' => 'Link Client'),$_POST); + $poolclient = new user_Form_PoolClient(array('buttontext' => 'Link Client'),$_POST); + $poolclient->setPage($page); try{ $poolID = $this->_request->getParam('poolID'); $poolmapper = new Application_Model_PoolMapper(); |
