diff --git a/application/forms/Setup/SummaryPage.php b/application/forms/Setup/SummaryPage.php new file mode 100644 index 000000000..c44899b58 --- /dev/null +++ b/application/forms/Setup/SummaryPage.php @@ -0,0 +1,52 @@ +setName('setup_summary'); + $this->setViewScript('form/setup-summary.phtml'); + } + + /** + * Set the summary to show + * + * @param array $summary + * + * @return self + */ + public function setSummary(array $summary) + { + $this->summary = $summary; + return $this; + } + + /** + * Return the summary to show + * + * @return array + */ + public function getSummary() + { + return $this->summary; + } +} diff --git a/application/views/scripts/form/setup-summary.phtml b/application/views/scripts/form/setup-summary.phtml new file mode 100644 index 000000000..4380866ed --- /dev/null +++ b/application/views/scripts/form/setup-summary.phtml @@ -0,0 +1,60 @@ + +

+
+ getSummary() as $pageTitle => $pageContent): ?> +
+

+ + $paragraphContent): ?> +
+ +

+ + + +
    + +
  • + +
+ + $topicContent): ?> +
+

+ +
    + +
  • + +
+ +

+ +
+ + + +

+ +
+ + +

+ +
+ +
+ getElement($form->getTokenElementName()); ?> + getElement($form->getUidElementName()); ?> + getElement(Wizard::BTN_PREV); ?> + getElement(Wizard::BTN_NEXT)->setLabel(t('Install Icinga Web 2')); ?> +
+
\ No newline at end of file diff --git a/library/Icinga/Application/WebSetup.php b/library/Icinga/Application/WebSetup.php index cedc58e90..cce64a462 100644 --- a/library/Icinga/Application/WebSetup.php +++ b/library/Icinga/Application/WebSetup.php @@ -6,6 +6,7 @@ namespace Icinga\Application; use PDOException; use Icinga\Form\Setup\WelcomePage; +use Icinga\Form\Setup\SummaryPage; use Icinga\Form\Setup\DbResourcePage; use Icinga\Form\Setup\PreferencesPage; use Icinga\Form\Setup\AuthBackendPage; @@ -68,6 +69,7 @@ class WebSetup extends Wizard implements SetupWizard $this->addPage(new AdminAccountPage()); $this->addPage(new GeneralConfigPage()); $this->addPage(new DatabaseCreationPage()); + $this->addPage(new SummaryPage()); } /** @@ -109,6 +111,8 @@ class WebSetup extends Wizard implements SetupWizard } elseif ($page->getName() === 'setup_database_creation') { $page->setDatabasePrivileges($this->databaseSetupPrivileges); $page->setResourceConfig($this->getPageData('setup_db_resource')); + } elseif ($page->getName() === 'setup_summary') { + $page->setSummary($this->getInstaller()->getSummary()); } } diff --git a/public/css/icinga/wizard.less b/public/css/icinga/wizard.less index af280208d..b95993841 100644 --- a/public/css/icinga/wizard.less +++ b/public/css/icinga/wizard.less @@ -25,4 +25,30 @@ display: inline-block; padding: 0.4em 0.2em 0; } +} + +#wizard div.summary { + div.page { + h2 { + font-size: 1.2em; + } + + .paragraph { + margin-left: 2em; + + h3 { + font-size: 1em; + } + + .topic { + h4 { + font-size: 0.8em; + } + } + + div.topic { + margin-left: 2em; + } + } + } } \ No newline at end of file