diff --git a/modules/monitoring/application/forms/Setup/BackendPage.php b/modules/monitoring/application/forms/Setup/BackendPage.php index 2011c482d..097d2586b 100644 --- a/modules/monitoring/application/forms/Setup/BackendPage.php +++ b/modules/monitoring/application/forms/Setup/BackendPage.php @@ -17,6 +17,18 @@ class BackendPage extends Form public function createElements(array $formData) { + $this->addElement( + new Note( + 'title', + array( + 'value' => mt('monitoring', 'Monitoring Backend', 'setup.page.title'), + 'decorators' => array( + 'ViewHelper', + array('HtmlTag', array('tag' => 'h2')) + ) + ) + ) + ); $this->addElement( new Note( 'description', diff --git a/modules/monitoring/application/forms/Setup/IdoResourcePage.php b/modules/monitoring/application/forms/Setup/IdoResourcePage.php index 03c478153..3e844027c 100644 --- a/modules/monitoring/application/forms/Setup/IdoResourcePage.php +++ b/modules/monitoring/application/forms/Setup/IdoResourcePage.php @@ -25,6 +25,18 @@ class IdoResourcePage extends Form 'value' => 'db' ) ); + $this->addElement( + new Note( + 'title', + array( + 'value' => mt('monitoring', 'Monitoring IDO Resource', 'setup.page.title'), + 'decorators' => array( + 'ViewHelper', + array('HtmlTag', array('tag' => 'h2')) + ) + ) + ) + ); $this->addElement( new Note( 'description', diff --git a/modules/monitoring/application/forms/Setup/InstancePage.php b/modules/monitoring/application/forms/Setup/InstancePage.php index cbf7df78f..7398dae1c 100644 --- a/modules/monitoring/application/forms/Setup/InstancePage.php +++ b/modules/monitoring/application/forms/Setup/InstancePage.php @@ -17,6 +17,18 @@ class InstancePage extends Form public function createElements(array $formData) { + $this->addElement( + new Note( + 'title', + array( + 'value' => mt('monitoring', 'Monitoring Instance', 'setup.page.title'), + 'decorators' => array( + 'ViewHelper', + array('HtmlTag', array('tag' => 'h2')) + ) + ) + ) + ); $this->addElement( new Note( 'description', diff --git a/modules/monitoring/application/forms/Setup/LivestatusResourcePage.php b/modules/monitoring/application/forms/Setup/LivestatusResourcePage.php index ddb942d50..9ae36aebf 100644 --- a/modules/monitoring/application/forms/Setup/LivestatusResourcePage.php +++ b/modules/monitoring/application/forms/Setup/LivestatusResourcePage.php @@ -25,6 +25,18 @@ class LivestatusResourcePage extends Form 'value' => 'livestatus' ) ); + $this->addElement( + new Note( + 'title', + array( + 'value' => mt('monitoring', 'Monitoring Livestatus Resource', 'setup.page.title'), + 'decorators' => array( + 'ViewHelper', + array('HtmlTag', array('tag' => 'h2')) + ) + ) + ) + ); $this->addElement( new Note( 'description', diff --git a/modules/monitoring/application/forms/Setup/SecurityPage.php b/modules/monitoring/application/forms/Setup/SecurityPage.php index ed639aefd..70c90c8a3 100644 --- a/modules/monitoring/application/forms/Setup/SecurityPage.php +++ b/modules/monitoring/application/forms/Setup/SecurityPage.php @@ -17,6 +17,18 @@ class SecurityPage extends Form public function createElements(array $formData) { + $this->addElement( + new Note( + 'title', + array( + 'value' => mt('monitoring', 'Monitoring Security', 'setup.page.title'), + 'decorators' => array( + 'ViewHelper', + array('HtmlTag', array('tag' => 'h2')) + ) + ) + ) + ); $this->addElement( new Note( 'description', diff --git a/modules/monitoring/library/Monitoring/BackendStep.php b/modules/monitoring/library/Monitoring/BackendStep.php index 529c115a2..35347853a 100644 --- a/modules/monitoring/library/Monitoring/BackendStep.php +++ b/modules/monitoring/library/Monitoring/BackendStep.php @@ -80,7 +80,7 @@ class BackendStep extends Step public function getSummary() { - $pageTitle = '

' . mt('monitoring', 'Monitoring Backend') . '

'; + $pageTitle = '

' . mt('monitoring', 'Monitoring Backend', 'setup.page.title') . '

'; $backendDescription = '

' . sprintf( mt( 'monitoring', diff --git a/modules/monitoring/library/Monitoring/InstanceStep.php b/modules/monitoring/library/Monitoring/InstanceStep.php index 219c2f8ff..f8becea45 100644 --- a/modules/monitoring/library/Monitoring/InstanceStep.php +++ b/modules/monitoring/library/Monitoring/InstanceStep.php @@ -44,7 +44,7 @@ class InstanceStep extends Step public function getSummary() { - $pageTitle = '

' . mt('monitoring', 'Monitoring Instance') . '

'; + $pageTitle = '

' . mt('monitoring', 'Monitoring Instance', 'setup.page.title') . '

'; if (isset($this->data['instanceConfig']['host'])) { $pipeHtml = '

' . sprintf( diff --git a/modules/monitoring/library/Monitoring/SecurityStep.php b/modules/monitoring/library/Monitoring/SecurityStep.php index 45aa1290b..88fb149d8 100644 --- a/modules/monitoring/library/Monitoring/SecurityStep.php +++ b/modules/monitoring/library/Monitoring/SecurityStep.php @@ -43,7 +43,7 @@ class SecurityStep extends Step public function getSummary() { - $pageTitle = '

' . mt('monitoring', 'Monitoring Security') . '

'; + $pageTitle = '

' . mt('monitoring', 'Monitoring Security', 'setup.page.title') . '

'; $pageDescription = '

' . mt( 'monitoring', 'Icinga Web 2 will protect your monitoring environment against' diff --git a/modules/setup/application/forms/AdminAccountPage.php b/modules/setup/application/forms/AdminAccountPage.php index eca6610a9..38101fe85 100644 --- a/modules/setup/application/forms/AdminAccountPage.php +++ b/modules/setup/application/forms/AdminAccountPage.php @@ -176,14 +176,26 @@ class AdminAccountPage extends Form ); } + $this->addElement( + new Note( + 'title', + array( + 'value' => mt('setup', 'Administration', 'setup.page.title'), + 'decorators' => array( + 'ViewHelper', + array('HtmlTag', array('tag' => 'h2')) + ) + ) + ) + ); $this->addElement( new Note( 'description', array( 'value' => tp( - 'Now it\'s time to configure your first administrative account.' + 'Now it\'s time to configure your first administrative account for Icinga Web 2.' . ' Please follow the instructions below:', - 'Now it\'s time to configure your first administrative account.' + 'Now it\'s time to configure your first administrative account for Icinga Web 2.' . ' Below are several options you can choose from. Select one and follow its instructions:', count($choices) ) diff --git a/modules/setup/application/forms/AuthBackendPage.php b/modules/setup/application/forms/AuthBackendPage.php index 1945171eb..89a060a06 100644 --- a/modules/setup/application/forms/AuthBackendPage.php +++ b/modules/setup/application/forms/AuthBackendPage.php @@ -59,6 +59,19 @@ class AuthBackendPage extends Form */ public function createElements(array $formData) { + $this->addElement( + new Note( + 'title', + array( + 'value' => mt('setup', 'Authentication Backend', 'setup.page.title'), + 'decorators' => array( + 'ViewHelper', + array('HtmlTag', array('tag' => 'h2')) + ) + ) + ) + ); + if ($this->config['type'] === 'db') { $note = mt( 'setup', @@ -137,7 +150,7 @@ class AuthBackendPage extends Form 'checkbox', 'skip_validation', array( - 'order' => 1, + 'order' => 2, 'ignore' => true, 'required' => true, 'label' => mt('setup', 'Skip Validation'), diff --git a/modules/setup/application/forms/AuthenticationPage.php b/modules/setup/application/forms/AuthenticationPage.php index d2299709c..345625c94 100644 --- a/modules/setup/application/forms/AuthenticationPage.php +++ b/modules/setup/application/forms/AuthenticationPage.php @@ -26,6 +26,18 @@ class AuthenticationPage extends Form */ public function createElements(array $formData) { + $this->addElement( + new Note( + 'title', + array( + 'value' => mt('setup', 'Authentication', 'setup.page.title'), + 'decorators' => array( + 'ViewHelper', + array('HtmlTag', array('tag' => 'h2')) + ) + ) + ) + ); $this->addElement( new Note( 'description', diff --git a/modules/setup/application/forms/DatabaseCreationPage.php b/modules/setup/application/forms/DatabaseCreationPage.php index 4e2e4c054..556e20e28 100644 --- a/modules/setup/application/forms/DatabaseCreationPage.php +++ b/modules/setup/application/forms/DatabaseCreationPage.php @@ -87,6 +87,18 @@ class DatabaseCreationPage extends Form */ public function createElements(array $formData) { + $this->addElement( + new Note( + 'title', + array( + 'value' => mt('setup', 'Database Setup', 'setup.page.title'), + 'decorators' => array( + 'ViewHelper', + array('HtmlTag', array('tag' => 'h2')) + ) + ) + ) + ); $this->addElement( new Note( 'description', @@ -204,7 +216,7 @@ class DatabaseCreationPage extends Form 'checkbox', 'skip_validation', array( - 'order' => 1, + 'order' => 2, 'required' => true, 'label' => mt('setup', 'Skip Validation'), 'description' => mt( diff --git a/modules/setup/application/forms/DbResourcePage.php b/modules/setup/application/forms/DbResourcePage.php index d55e198cb..326f9131d 100644 --- a/modules/setup/application/forms/DbResourcePage.php +++ b/modules/setup/application/forms/DbResourcePage.php @@ -36,6 +36,18 @@ class DbResourcePage extends Form 'value' => 'db' ) ); + $this->addElement( + new Note( + 'title', + array( + 'value' => mt('setup', 'Database Resource', 'setup.page.title'), + 'decorators' => array( + 'ViewHelper', + array('HtmlTag', array('tag' => 'h2')) + ) + ) + ) + ); $this->addElement( new Note( 'description', diff --git a/modules/setup/application/forms/GeneralConfigPage.php b/modules/setup/application/forms/GeneralConfigPage.php index 0e8856acd..5ec952445 100644 --- a/modules/setup/application/forms/GeneralConfigPage.php +++ b/modules/setup/application/forms/GeneralConfigPage.php @@ -27,6 +27,18 @@ class GeneralConfigPage extends Form */ public function createElements(array $formData) { + $this->addElement( + new Note( + 'title', + array( + 'value' => mt('setup', 'Application Configuration', 'setup.page.title'), + 'decorators' => array( + 'ViewHelper', + array('HtmlTag', array('tag' => 'h2')) + ) + ) + ) + ); $this->addElement( new Note( 'description', diff --git a/modules/setup/application/forms/LdapDiscoveryConfirmPage.php b/modules/setup/application/forms/LdapDiscoveryConfirmPage.php index e1f3da643..bd312ca76 100644 --- a/modules/setup/application/forms/LdapDiscoveryConfirmPage.php +++ b/modules/setup/application/forms/LdapDiscoveryConfirmPage.php @@ -17,7 +17,6 @@ class LdapDiscoveryConfirmPage extends Form const TYPE_MISC = 'LDAP'; private $infoTemplate = <<< 'EOT' -Found LDAP server on {domain} @@ -73,7 +72,6 @@ EOT; $resource = $this->config['resource']; $backend = $this->config['backend']; $html = $this->infoTemplate; - $html = str_replace('{domain}', $this->config['domain'], $html); $html = str_replace('{type}', $this->config['type'], $html); $html = str_replace('{hostname}', $resource['hostname'], $html); $html = str_replace('{port}', $resource['port'], $html); @@ -81,6 +79,30 @@ EOT; $html = str_replace('{user_attribute}', $backend['user_name_attribute'], $html); $html = str_replace('{user_class}', $backend['user_class'], $html); + $this->addElement( + new Note( + 'title', + array( + 'value' => mt('setup', 'LDAP Discovery Results', 'setup.page.title'), + 'decorators' => array( + 'ViewHelper', + array('HtmlTag', array('tag' => 'h2')) + ) + ) + ) + ); + $this->addElement( + new Note( + 'description', + array( + 'value' => sprintf( + mt('setup', 'The following directory service has been found on domain "%s":'), + $this->config['domain'] + ) + ) + ) + ); + $this->addElement( new Note( 'suggestion', diff --git a/modules/setup/application/forms/LdapDiscoveryPage.php b/modules/setup/application/forms/LdapDiscoveryPage.php index 75622e1b7..7fe799d19 100644 --- a/modules/setup/application/forms/LdapDiscoveryPage.php +++ b/modules/setup/application/forms/LdapDiscoveryPage.php @@ -31,6 +31,18 @@ class LdapDiscoveryPage extends Form */ public function createElements(array $formData) { + $this->addElement( + new Note( + 'title', + array( + 'value' => mt('setup', 'LDAP Discovery', 'setup.page.title'), + 'decorators' => array( + 'ViewHelper', + array('HtmlTag', array('tag' => 'h2')) + ) + ) + ) + ); $this->addElement( new Note( 'description', @@ -46,6 +58,9 @@ class LdapDiscoveryPage extends Form $this->discoveryForm = new LdapDiscoveryForm(); $this->addElements($this->discoveryForm->createElements($formData)->getElements()); + $this->getElement('domain')->setRequired( + isset($formData['skip_validation']) === false || ! $formData['skip_validation'] + ); $this->addElement( 'checkbox', diff --git a/modules/setup/application/forms/LdapResourcePage.php b/modules/setup/application/forms/LdapResourcePage.php index a53bd74e8..9f08f75e0 100644 --- a/modules/setup/application/forms/LdapResourcePage.php +++ b/modules/setup/application/forms/LdapResourcePage.php @@ -34,6 +34,18 @@ class LdapResourcePage extends Form 'value' => 'ldap' ) ); + $this->addElement( + new Note( + 'title', + array( + 'value' => mt('setup', 'LDAP Resource', 'setup.page.title'), + 'decorators' => array( + 'ViewHelper', + array('HtmlTag', array('tag' => 'h2')) + ) + ) + ) + ); $this->addElement( new Note( 'description', diff --git a/modules/setup/application/forms/PreferencesPage.php b/modules/setup/application/forms/PreferencesPage.php index 13bd2ff9b..276bbbff9 100644 --- a/modules/setup/application/forms/PreferencesPage.php +++ b/modules/setup/application/forms/PreferencesPage.php @@ -44,6 +44,18 @@ class PreferencesPage extends Form */ public function createElements(array $formData) { + $this->addElement( + new Note( + 'title', + array( + 'value' => mt('setup', 'Preferences', 'setup.page.title'), + 'decorators' => array( + 'ViewHelper', + array('HtmlTag', array('tag' => 'h2')) + ) + ) + ) + ); $this->addElement( new Note( 'description', diff --git a/modules/setup/application/views/scripts/form/setup-admin-account.phtml b/modules/setup/application/views/scripts/form/setup-admin-account.phtml index 41ff42c4e..ac060526a 100644 --- a/modules/setup/application/views/scripts/form/setup-admin-account.phtml +++ b/modules/setup/application/views/scripts/form/setup-admin-account.phtml @@ -7,6 +7,7 @@ $showRadioBoxes = strpos(strtolower(get_class($radioElem)), 'radio') !== false; ?> + getElement('title'); ?> getElement('description'); ?> getElement('by_name')) !== null): ?>
diff --git a/modules/setup/library/Setup/Steps/AuthenticationStep.php b/modules/setup/library/Setup/Steps/AuthenticationStep.php index 42a8c451e..f036b7ac4 100644 --- a/modules/setup/library/Setup/Steps/AuthenticationStep.php +++ b/modules/setup/library/Setup/Steps/AuthenticationStep.php @@ -112,9 +112,9 @@ class AuthenticationStep extends Step public function getSummary() { - $pageTitle = '

' . mt('setup', 'Authentication') . '

'; - $backendTitle = '

' . mt('setup', 'Backend Configuration') . '

'; - $adminTitle = '

' . mt('setup', 'Initial Administrative Account') . '

'; + $pageTitle = '

' . mt('setup', 'Authentication', 'setup.page.title') . '

'; + $backendTitle = '

' . mt('setup', 'Authentication Backend', 'setup.page.title') . '

'; + $adminTitle = '

' . mt('setup', 'Administration', 'setup.page.title') . '

'; $authType = $this->data['backendConfig']['backend']; $backendDesc = '

' . sprintf( diff --git a/modules/setup/library/Setup/Steps/DatabaseStep.php b/modules/setup/library/Setup/Steps/DatabaseStep.php index 834285fa6..c6ec2ef2b 100644 --- a/modules/setup/library/Setup/Steps/DatabaseStep.php +++ b/modules/setup/library/Setup/Steps/DatabaseStep.php @@ -243,7 +243,7 @@ class DatabaseStep extends Step } } - return '

' . mt('setup', 'Database Setup') . '

' . $message . '

'; + return '

' . mt('setup', 'Database Setup', 'setup.page.title') . '

' . $message . '

'; } public function getReport() diff --git a/modules/setup/library/Setup/Steps/GeneralConfigStep.php b/modules/setup/library/Setup/Steps/GeneralConfigStep.php index a2a8d2d7f..979f54c02 100644 --- a/modules/setup/library/Setup/Steps/GeneralConfigStep.php +++ b/modules/setup/library/Setup/Steps/GeneralConfigStep.php @@ -52,7 +52,7 @@ class GeneralConfigStep extends Step public function getSummary() { - $pageTitle = '

' . mt('setup', 'Application Configuration') . '

'; + $pageTitle = '

' . mt('setup', 'Application Configuration', 'setup.page.title') . '

'; $generalTitle = '

' . t('General', 'app.config') . '

'; $loggingTitle = '

' . t('Logging', 'app.config') . '

'; diff --git a/modules/setup/library/Setup/Steps/ResourceStep.php b/modules/setup/library/Setup/Steps/ResourceStep.php index 981051f3e..75815a60a 100644 --- a/modules/setup/library/Setup/Steps/ResourceStep.php +++ b/modules/setup/library/Setup/Steps/ResourceStep.php @@ -56,13 +56,13 @@ class ResourceStep extends Step public function getSummary() { if (isset($this->data['dbResourceConfig']) && isset($this->data['ldapResourceConfig'])) { - $pageTitle = '

' . mt('setup', 'Resources') . '

'; + $pageTitle = '

' . mt('setup', 'Resources', 'setup.page.title') . '

'; } else { - $pageTitle = '

' . mt('setup', 'Resource') . '

'; + $pageTitle = '

' . mt('setup', 'Resource', 'setup.page.title') . '

'; } if (isset($this->data['dbResourceConfig'])) { - $dbTitle = '

' . mt('setup', 'Database') . '

'; + $dbTitle = '

' . mt('setup', 'Database', 'setup.page.title') . '

'; $dbHtml = '' . '
Type:{type}
Port:{port}
' . '' diff --git a/public/css/icinga/setup.less b/public/css/icinga/setup.less index 7df18173e..11f7bed97 100644 --- a/public/css/icinga/setup.less +++ b/public/css/icinga/setup.less @@ -94,6 +94,13 @@ .setup-content { margin: 1.5em 1.8em 0 1.8em; + + form { + h2 { + font-size: 1.5em; + color: #444; + } + } } }