Restructure to have the index action present an overview
The index action should display an overview over the available actions Signed-off-by: Michael Tänzer <neo@nhng.de>
This commit is contained in:
parent
87d25d7024
commit
a1f716c45f
2 changed files with 4 additions and 8 deletions
|
@ -21,21 +21,17 @@ class AddPointsController extends Zend_Controller_Action
|
|||
|
||||
public function indexAction()
|
||||
{
|
||||
$this->view->assurance_form = $this->getAssuranceForm();
|
||||
$this->render('index');
|
||||
// Just render the view
|
||||
return;
|
||||
}
|
||||
|
||||
public function assuranceAction()
|
||||
{
|
||||
// Validate form
|
||||
if (!$this->getRequest()->isPost()) {
|
||||
return $this->_forward('index');
|
||||
}
|
||||
|
||||
$form = $this->getAssuranceForm();
|
||||
if (!$form->isValid($_POST)) {
|
||||
if (!$this->getRequest()->isPost() || !$form->isValid($_POST)) {
|
||||
$this->view->assurance_form = $form;
|
||||
return $this->render('index');
|
||||
return $this->render('assuranceform');
|
||||
}
|
||||
|
||||
// Form is valid -> get values for processing
|
||||
|
|
Loading…
Reference in a new issue