diff --git a/application/forms/Setup/AdminAccountPage.php b/application/forms/Setup/AdminAccountPage.php index b087a3cf7..79237bac1 100644 --- a/application/forms/Setup/AdminAccountPage.php +++ b/application/forms/Setup/AdminAccountPage.php @@ -9,6 +9,7 @@ use Zend_Config; use LogicException; use Icinga\Web\Form; use Icinga\Data\ResourceFactory; +use Icinga\Web\Form\Element\Note; use Icinga\Authentication\Backend\DbUserBackend; use Icinga\Authentication\Backend\LdapUserBackend; @@ -171,15 +172,16 @@ class AdminAccountPage extends Form } $this->addElement( - 'note', - 'description', - array( - 'value' => tp( - 'Now it\'s time to configure your first administrative account.' - . ' Please follow the instructions below:', - 'Now it\'s time to configure your first administrative account.' - . ' Below are several options you can choose from. Select one and follow its instructions:', - count($choices) + new Note( + 'description', + array( + 'value' => tp( + 'Now it\'s time to configure your first administrative account.' + . ' Please follow the instructions below:', + 'Now it\'s time to configure your first administrative account.' + . ' Below are several options you can choose from. Select one and follow its instructions:', + count($choices) + ) ) ) ); diff --git a/application/forms/Setup/AuthBackendPage.php b/application/forms/Setup/AuthBackendPage.php index f6aaadceb..12d3e3f7d 100644 --- a/application/forms/Setup/AuthBackendPage.php +++ b/application/forms/Setup/AuthBackendPage.php @@ -6,6 +6,7 @@ namespace Icinga\Form\Setup; use Zend_Config; use Icinga\Web\Form; +use Icinga\Web\Form\Element\Note; use Icinga\Form\Config\Authentication\DbBackendForm; use Icinga\Form\Config\Authentication\LdapBackendForm; use Icinga\Form\Config\Authentication\AutologinBackendForm; @@ -59,16 +60,18 @@ class AuthBackendPage extends Form public function createElements(array $formData) { $this->addElement( - 'note', - 'description', - array( - 'value' => sprintf( - t( - 'Now please enter all configuration details required to authenticate using this %s backend.', - 'setup.auth.backend' - ), - $this->config['type'] === 'db' ? t('database', 'setup.auth.backend.type') : ( - $this->config['type'] === 'ldap' ? 'LDAP' : t('autologin', 'setup.auth.backend.type') + new Note( + 'description', + array( + 'value' => sprintf( + t( + 'Now please enter all configuration details required' + . ' to authenticate using this %s backend.', + 'setup.auth.backend' + ), + $this->config['type'] === 'db' ? t('database', 'setup.auth.backend.type') : ( + $this->config['type'] === 'ldap' ? 'LDAP' : t('autologin', 'setup.auth.backend.type') + ) ) ) ) diff --git a/application/forms/Setup/AuthenticationPage.php b/application/forms/Setup/AuthenticationPage.php index e5e2f1cfc..7ac565671 100644 --- a/application/forms/Setup/AuthenticationPage.php +++ b/application/forms/Setup/AuthenticationPage.php @@ -6,6 +6,7 @@ namespace Icinga\Form\Setup; use Icinga\Web\Form; use Icinga\Application\Platform; +use Icinga\Web\Form\Element\Note; /** * Wizard page to choose an authentication backend @@ -26,12 +27,13 @@ class AuthenticationPage extends Form public function createElements(array $formData) { $this->addElement( - 'note', - 'description', - array( - 'value' => t( - 'Please choose how you want to authenticate when accessing Icinga Web 2.' - . ' Configuring backend specific details follows in a later step.' + new Note( + 'description', + array( + 'value' => t( + 'Please choose how you want to authenticate when accessing Icinga Web 2.' + . ' Configuring backend specific details follows in a later step.' + ) ) ) ); diff --git a/application/forms/Setup/DbResourcePage.php b/application/forms/Setup/DbResourcePage.php index 4847639ea..37e08302b 100644 --- a/application/forms/Setup/DbResourcePage.php +++ b/application/forms/Setup/DbResourcePage.php @@ -7,6 +7,7 @@ namespace Icinga\Form\Setup; use PDOException; use Icinga\Web\Form; use Icinga\Web\Setup\DbTool; +use Icinga\Web\Form\Element\Note; use Icinga\Form\Config\Resource\DbResourceForm; /** @@ -36,12 +37,13 @@ class DbResourcePage extends Form ) ); $this->addElement( - 'note', - 'description', - array( - 'value' => t( - 'Now please configure your database resource. Note that the database itself does not need' - . ' to exist at this time as it is going to be created when installing Icinga Web 2.' + new Note( + 'description', + array( + 'value' => t( + 'Now please configure your database resource. Note that the database itself does not need' + . ' to exist at this time as it is going to be created when installing Icinga Web 2.' + ) ) ) ); diff --git a/application/forms/Setup/GeneralConfigPage.php b/application/forms/Setup/GeneralConfigPage.php index fa447ac86..689b393f1 100644 --- a/application/forms/Setup/GeneralConfigPage.php +++ b/application/forms/Setup/GeneralConfigPage.php @@ -5,6 +5,7 @@ namespace Icinga\Form\Setup; use Icinga\Web\Form; +use Icinga\Web\Form\Element\Note; use Icinga\Form\Config\General\LoggingConfigForm; use Icinga\Form\Config\General\ApplicationConfigForm; @@ -27,11 +28,12 @@ class GeneralConfigPage extends Form public function createElements(array $formData) { $this->addElement( - 'note', - 'description', - array( - 'value' => t( - 'Now please adjust all application and logging related configuration options to fit your needs.' + new Note( + 'description', + array( + 'value' => t( + 'Now please adjust all application and logging related configuration options to fit your needs.' + ) ) ) ); diff --git a/application/forms/Setup/LdapResourcePage.php b/application/forms/Setup/LdapResourcePage.php index bee41acd6..4a31502db 100644 --- a/application/forms/Setup/LdapResourcePage.php +++ b/application/forms/Setup/LdapResourcePage.php @@ -5,6 +5,7 @@ namespace Icinga\Form\Setup; use Icinga\Web\Form; +use Icinga\Web\Form\Element\Note; use Icinga\Form\Config\Resource\LdapResourceForm; /** @@ -34,12 +35,13 @@ class LdapResourcePage extends Form ) ); $this->addElement( - 'note', - 'description', - array( - 'value' => t( - 'Now please configure your AD/LDAP resource. This will later ' - . 'be used to authenticate users logging in to Icinga Web 2.' + new Note( + 'description', + array( + 'value' => t( + 'Now please configure your AD/LDAP resource. This will later ' + . 'be used to authenticate users logging in to Icinga Web 2.' + ) ) ) ); diff --git a/application/forms/Setup/PreferencesPage.php b/application/forms/Setup/PreferencesPage.php index f643d4a34..4e6a80cfb 100644 --- a/application/forms/Setup/PreferencesPage.php +++ b/application/forms/Setup/PreferencesPage.php @@ -6,6 +6,7 @@ namespace Icinga\Form\Setup; use Icinga\Web\Form; use Icinga\Application\Platform; +use Icinga\Web\Form\Element\Note; /** * Wizard page to choose a preference backend @@ -41,10 +42,11 @@ class PreferencesPage extends Form public function createElements(array $formData) { $this->addElement( - 'note', - 'description', - array( - 'value' => t('Please choose how Icinga Web 2 should store user preferences.') + new Note( + 'description', + array( + 'value' => t('Please choose how Icinga Web 2 should store user preferences.') + ) ) ); diff --git a/application/forms/Setup/WelcomePage.php b/application/forms/Setup/WelcomePage.php index 1195fc651..40c2fc564 100644 --- a/application/forms/Setup/WelcomePage.php +++ b/application/forms/Setup/WelcomePage.php @@ -6,6 +6,7 @@ namespace Icinga\Form\Setup; use Icinga\Application\Icinga; use Icinga\Web\Form; +use Icinga\Web\Form\Element\Note; use Icinga\Web\Form\Validator\TokenValidator; /** @@ -27,17 +28,19 @@ class WelcomePage extends Form public function createElements(array $formData) { $this->addElement( - 'note', - 'welcome', - array( - 'value' => t('%WELCOME%') + new Note( + 'welcome', + array( + 'value' => t('%WELCOME%') + ) ) ); $this->addElement( - 'note', - 'description', - array( - 'value' => t('%DESCRIPTION%') + new Note( + 'description', + array( + 'value' => t('%DESCRIPTION%') + ) ) ); $this->addElement(