Use Icinga\Web\Form\Element\Note instead of Zend_Form_Element_Note
Zend_Form_Element_Note is not available prior Zend v1.12.2 refs #7163
This commit is contained in:
parent
cbadaa78d6
commit
e9e4ef01e5
|
@ -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)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
|
|
@ -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')
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
|
@ -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.'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
|
|
@ -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.'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
|
|
@ -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.'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
|
|
@ -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.'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
|
|
@ -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.')
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue