mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 16:24:04 +02:00
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 LogicException;
|
||||||
use Icinga\Web\Form;
|
use Icinga\Web\Form;
|
||||||
use Icinga\Data\ResourceFactory;
|
use Icinga\Data\ResourceFactory;
|
||||||
|
use Icinga\Web\Form\Element\Note;
|
||||||
use Icinga\Authentication\Backend\DbUserBackend;
|
use Icinga\Authentication\Backend\DbUserBackend;
|
||||||
use Icinga\Authentication\Backend\LdapUserBackend;
|
use Icinga\Authentication\Backend\LdapUserBackend;
|
||||||
|
|
||||||
@ -171,7 +172,7 @@ class AdminAccountPage extends Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'note',
|
new Note(
|
||||||
'description',
|
'description',
|
||||||
array(
|
array(
|
||||||
'value' => tp(
|
'value' => tp(
|
||||||
@ -182,6 +183,7 @@ class AdminAccountPage extends Form
|
|||||||
count($choices)
|
count($choices)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ namespace Icinga\Form\Setup;
|
|||||||
|
|
||||||
use Zend_Config;
|
use Zend_Config;
|
||||||
use Icinga\Web\Form;
|
use Icinga\Web\Form;
|
||||||
|
use Icinga\Web\Form\Element\Note;
|
||||||
use Icinga\Form\Config\Authentication\DbBackendForm;
|
use Icinga\Form\Config\Authentication\DbBackendForm;
|
||||||
use Icinga\Form\Config\Authentication\LdapBackendForm;
|
use Icinga\Form\Config\Authentication\LdapBackendForm;
|
||||||
use Icinga\Form\Config\Authentication\AutologinBackendForm;
|
use Icinga\Form\Config\Authentication\AutologinBackendForm;
|
||||||
@ -59,12 +60,13 @@ class AuthBackendPage extends Form
|
|||||||
public function createElements(array $formData)
|
public function createElements(array $formData)
|
||||||
{
|
{
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'note',
|
new Note(
|
||||||
'description',
|
'description',
|
||||||
array(
|
array(
|
||||||
'value' => sprintf(
|
'value' => sprintf(
|
||||||
t(
|
t(
|
||||||
'Now please enter all configuration details required to authenticate using this %s backend.',
|
'Now please enter all configuration details required'
|
||||||
|
. ' to authenticate using this %s backend.',
|
||||||
'setup.auth.backend'
|
'setup.auth.backend'
|
||||||
),
|
),
|
||||||
$this->config['type'] === 'db' ? t('database', 'setup.auth.backend.type') : (
|
$this->config['type'] === 'db' ? t('database', 'setup.auth.backend.type') : (
|
||||||
@ -72,6 +74,7 @@ class AuthBackendPage extends Form
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isset($formData['skip_validation']) && $formData['skip_validation']) {
|
if (isset($formData['skip_validation']) && $formData['skip_validation']) {
|
||||||
|
@ -6,6 +6,7 @@ namespace Icinga\Form\Setup;
|
|||||||
|
|
||||||
use Icinga\Web\Form;
|
use Icinga\Web\Form;
|
||||||
use Icinga\Application\Platform;
|
use Icinga\Application\Platform;
|
||||||
|
use Icinga\Web\Form\Element\Note;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wizard page to choose an authentication backend
|
* Wizard page to choose an authentication backend
|
||||||
@ -26,7 +27,7 @@ class AuthenticationPage extends Form
|
|||||||
public function createElements(array $formData)
|
public function createElements(array $formData)
|
||||||
{
|
{
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'note',
|
new Note(
|
||||||
'description',
|
'description',
|
||||||
array(
|
array(
|
||||||
'value' => t(
|
'value' => t(
|
||||||
@ -34,6 +35,7 @@ class AuthenticationPage extends Form
|
|||||||
. ' Configuring backend specific details follows in a later step.'
|
. ' Configuring backend specific details follows in a later step.'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$backendTypes = array();
|
$backendTypes = array();
|
||||||
|
@ -7,6 +7,7 @@ namespace Icinga\Form\Setup;
|
|||||||
use PDOException;
|
use PDOException;
|
||||||
use Icinga\Web\Form;
|
use Icinga\Web\Form;
|
||||||
use Icinga\Web\Setup\DbTool;
|
use Icinga\Web\Setup\DbTool;
|
||||||
|
use Icinga\Web\Form\Element\Note;
|
||||||
use Icinga\Form\Config\Resource\DbResourceForm;
|
use Icinga\Form\Config\Resource\DbResourceForm;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -36,7 +37,7 @@ class DbResourcePage extends Form
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'note',
|
new Note(
|
||||||
'description',
|
'description',
|
||||||
array(
|
array(
|
||||||
'value' => t(
|
'value' => t(
|
||||||
@ -44,6 +45,7 @@ class DbResourcePage extends Form
|
|||||||
. ' to exist at this time as it is going to be created when installing Icinga Web 2.'
|
. ' to exist at this time as it is going to be created when installing Icinga Web 2.'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isset($formData['skip_validation']) && $formData['skip_validation']) {
|
if (isset($formData['skip_validation']) && $formData['skip_validation']) {
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
namespace Icinga\Form\Setup;
|
namespace Icinga\Form\Setup;
|
||||||
|
|
||||||
use Icinga\Web\Form;
|
use Icinga\Web\Form;
|
||||||
|
use Icinga\Web\Form\Element\Note;
|
||||||
use Icinga\Form\Config\General\LoggingConfigForm;
|
use Icinga\Form\Config\General\LoggingConfigForm;
|
||||||
use Icinga\Form\Config\General\ApplicationConfigForm;
|
use Icinga\Form\Config\General\ApplicationConfigForm;
|
||||||
|
|
||||||
@ -27,13 +28,14 @@ class GeneralConfigPage extends Form
|
|||||||
public function createElements(array $formData)
|
public function createElements(array $formData)
|
||||||
{
|
{
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'note',
|
new Note(
|
||||||
'description',
|
'description',
|
||||||
array(
|
array(
|
||||||
'value' => t(
|
'value' => t(
|
||||||
'Now please adjust all application and logging related configuration options to fit your needs.'
|
'Now please adjust all application and logging related configuration options to fit your needs.'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$appForm = new ApplicationConfigForm();
|
$appForm = new ApplicationConfigForm();
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
namespace Icinga\Form\Setup;
|
namespace Icinga\Form\Setup;
|
||||||
|
|
||||||
use Icinga\Web\Form;
|
use Icinga\Web\Form;
|
||||||
|
use Icinga\Web\Form\Element\Note;
|
||||||
use Icinga\Form\Config\Resource\LdapResourceForm;
|
use Icinga\Form\Config\Resource\LdapResourceForm;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -34,7 +35,7 @@ class LdapResourcePage extends Form
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'note',
|
new Note(
|
||||||
'description',
|
'description',
|
||||||
array(
|
array(
|
||||||
'value' => t(
|
'value' => t(
|
||||||
@ -42,6 +43,7 @@ class LdapResourcePage extends Form
|
|||||||
. 'be used to authenticate users logging in to Icinga Web 2.'
|
. 'be used to authenticate users logging in to Icinga Web 2.'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isset($formData['skip_validation']) && $formData['skip_validation']) {
|
if (isset($formData['skip_validation']) && $formData['skip_validation']) {
|
||||||
|
@ -6,6 +6,7 @@ namespace Icinga\Form\Setup;
|
|||||||
|
|
||||||
use Icinga\Web\Form;
|
use Icinga\Web\Form;
|
||||||
use Icinga\Application\Platform;
|
use Icinga\Application\Platform;
|
||||||
|
use Icinga\Web\Form\Element\Note;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wizard page to choose a preference backend
|
* Wizard page to choose a preference backend
|
||||||
@ -41,11 +42,12 @@ class PreferencesPage extends Form
|
|||||||
public function createElements(array $formData)
|
public function createElements(array $formData)
|
||||||
{
|
{
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'note',
|
new Note(
|
||||||
'description',
|
'description',
|
||||||
array(
|
array(
|
||||||
'value' => t('Please choose how Icinga Web 2 should store user preferences.')
|
'value' => t('Please choose how Icinga Web 2 should store user preferences.')
|
||||||
)
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$storageTypes = array();
|
$storageTypes = array();
|
||||||
|
@ -6,6 +6,7 @@ namespace Icinga\Form\Setup;
|
|||||||
|
|
||||||
use Icinga\Application\Icinga;
|
use Icinga\Application\Icinga;
|
||||||
use Icinga\Web\Form;
|
use Icinga\Web\Form;
|
||||||
|
use Icinga\Web\Form\Element\Note;
|
||||||
use Icinga\Web\Form\Validator\TokenValidator;
|
use Icinga\Web\Form\Validator\TokenValidator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -27,18 +28,20 @@ class WelcomePage extends Form
|
|||||||
public function createElements(array $formData)
|
public function createElements(array $formData)
|
||||||
{
|
{
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'note',
|
new Note(
|
||||||
'welcome',
|
'welcome',
|
||||||
array(
|
array(
|
||||||
'value' => t('%WELCOME%')
|
'value' => t('%WELCOME%')
|
||||||
)
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'note',
|
new Note(
|
||||||
'description',
|
'description',
|
||||||
array(
|
array(
|
||||||
'value' => t('%DESCRIPTION%')
|
'value' => t('%DESCRIPTION%')
|
||||||
)
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'text',
|
'text',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user