diff --git a/modules/monitoring/library/Monitoring/MonitoringWizard.php b/modules/monitoring/library/Monitoring/MonitoringWizard.php index 9c588e5b3..a21ee9706 100644 --- a/modules/monitoring/library/Monitoring/MonitoringWizard.php +++ b/modules/monitoring/library/Monitoring/MonitoringWizard.php @@ -37,7 +37,7 @@ class MonitoringWizard extends Wizard implements SetupWizard $this->addPage(new LivestatusResourcePage()); $this->addPage(new InstancePage()); $this->addPage(new SecurityPage()); - $this->addPage(new SummaryPage()); + $this->addPage(new SummaryPage(array('name' => 'setup_monitoring_summary'))); } /** @@ -47,7 +47,7 @@ class MonitoringWizard extends Wizard implements SetupWizard { if ($page->getName() === 'setup_requirements') { $page->setRequirements($this->getRequirements()); - } elseif ($page->getName() === 'setup_summary') { + } elseif ($page->getName() === 'setup_monitoring_summary') { $page->setSummary($this->getSetup()->getSummary()); $page->setSubjectTitle(mt('monitoring', 'the monitoring module', 'setup.summary.subject')); } elseif ( diff --git a/modules/setup/application/forms/SummaryPage.php b/modules/setup/application/forms/SummaryPage.php index 14ad93c56..9b42ec9d8 100644 --- a/modules/setup/application/forms/SummaryPage.php +++ b/modules/setup/application/forms/SummaryPage.php @@ -4,6 +4,7 @@ namespace Icinga\Module\Setup\Forms; +use LogicException; use Icinga\Web\Form; /** @@ -30,7 +31,12 @@ class SummaryPage extends Form */ public function init() { - $this->setName('setup_summary'); + if ($this->getName() === $this->filterName(get_class($this))) { + throw new LogicException( + 'When utilizing ' . get_class($this) . ' it is required to set a unique name by using the form options' + ); + } + $this->setViewScript('form/setup-summary.phtml'); } diff --git a/modules/setup/application/views/scripts/form/setup-summary.phtml b/modules/setup/application/views/scripts/form/setup-summary.phtml index fa354feb5..676dcd52f 100644 --- a/modules/setup/application/views/scripts/form/setup-summary.phtml +++ b/modules/setup/application/views/scripts/form/setup-summary.phtml @@ -20,7 +20,7 @@ use Icinga\Web\Wizard; -