Fix multistep form creation

refs #6136
This commit is contained in:
Johannes Meyer 2014-05-14 11:01:01 +02:00
parent 429e09aae2
commit 1637a19c23
2 changed files with 3 additions and 1 deletions

View File

@ -33,9 +33,9 @@ class InstallController extends ActionController
public function indexAction()
{
$wizard = $this->createWizard();
$wizard->navigate(); // Needs to be called before isSubmittedAndValid() as this creates the form
if ($wizard->isSubmittedAndValid()) {
$wizard->navigate();
if ($wizard->isFinished()) {
// TODO: Run the installer (Who creates an installer? How do we handle module installers?)
$this->dropConfiguration(); // TODO: Should only be done if the installation has been successfully completed

View File

@ -288,6 +288,7 @@ class Wizard extends Page
$pages = $this->getPages();
$currentStep = $this->getProgress();
$page->buildForm(); // Needs to get called manually as it's nothing that Zend knows about
$this->addSubForm($page, $page->getName());
if (!$this->isFirstPage($page)) {
@ -326,6 +327,7 @@ class Wizard extends Page
$isFirstSubPage = $wizard->isFirstPage($currentSubPage);
$isLastSubPage = $wizard->isLastPage($currentSubPage);
$currentSubPage->buildForm(); // Needs to get called manually as it's nothing that Zend knows about
$this->addSubForm($currentSubPage, $currentSubPage->getName());
if (!$isFirstPage || !$isFirstSubPage) {