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>
bug-1390
Michael Tänzer 14 years ago
parent 87d25d7024
commit a1f716c45f

@ -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…
Cancel
Save