mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
Pass the wizard title to the summary page to be able to reuse the page
Module wizards can now use the SummaryPage as well if they want to. refs #7163
This commit is contained in:
parent
e5512f586f
commit
1fd4a301c4
@ -11,6 +11,13 @@ use Icinga\Web\Form;
|
|||||||
*/
|
*/
|
||||||
class SummaryPage extends Form
|
class SummaryPage extends Form
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* The title of what is being installed
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $title;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The summary to show
|
* The summary to show
|
||||||
*
|
*
|
||||||
@ -27,6 +34,26 @@ class SummaryPage extends Form
|
|||||||
$this->setViewScript('form/setup-summary.phtml');
|
$this->setViewScript('form/setup-summary.phtml');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the title of what is being installed
|
||||||
|
*
|
||||||
|
* @param string $title
|
||||||
|
*/
|
||||||
|
public function setSubjectTitle($title)
|
||||||
|
{
|
||||||
|
$this->title = $title;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the title of what is being installed
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getSubjectTitle()
|
||||||
|
{
|
||||||
|
return $this->title;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the summary to show
|
* Set the summary to show
|
||||||
*
|
*
|
||||||
|
@ -3,10 +3,13 @@
|
|||||||
use Icinga\Web\Wizard;
|
use Icinga\Web\Wizard;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<p><?= t(
|
<p><?= sprintf(
|
||||||
'The wizard is now complete. You can review the changes supposed to be made before issuing the actual installation'
|
t(
|
||||||
. ' of Icinga Web 2. Make sure that everything is correct (Feel free to navigate back to make any corrections!) so'
|
'The wizard is now complete. You can review the changes supposed to be made before issuing the actual installation'
|
||||||
. ' that you can start using Icinga Web 2 right after the installation has been finished.'
|
. ' of %1$s. Make sure that everything is correct (Feel free to navigate back to make any corrections!) so'
|
||||||
|
. ' that you can start using %1$s right after the installation has been finished.'
|
||||||
|
),
|
||||||
|
$form->getSubjectTitle()
|
||||||
); ?></p>
|
); ?></p>
|
||||||
<div class="summary">
|
<div class="summary">
|
||||||
<?php foreach ($form->getSummary() as $pageHtml): ?>
|
<?php foreach ($form->getSummary() as $pageHtml): ?>
|
||||||
|
@ -112,6 +112,7 @@ class WebSetup extends Wizard implements SetupWizard
|
|||||||
$page->setDatabasePrivileges($this->databaseSetupPrivileges);
|
$page->setDatabasePrivileges($this->databaseSetupPrivileges);
|
||||||
$page->setResourceConfig($this->getPageData('setup_db_resource'));
|
$page->setResourceConfig($this->getPageData('setup_db_resource'));
|
||||||
} elseif ($page->getName() === 'setup_summary') {
|
} elseif ($page->getName() === 'setup_summary') {
|
||||||
|
$page->setSubjectTitle('Icinga Web 2');
|
||||||
$page->setSummary($this->getInstaller()->getSummary());
|
$page->setSummary($this->getInstaller()->getSummary());
|
||||||
} elseif ($page->getName() === 'setup_db_resource') {
|
} elseif ($page->getName() === 'setup_db_resource') {
|
||||||
$ldapData = $this->getPageData('setup_ldap_resource');
|
$ldapData = $this->getPageData('setup_ldap_resource');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user