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:
Johannes Meyer 2014-09-29 15:46:30 +02:00
parent cbadaa78d6
commit e9e4ef01e5
8 changed files with 72 additions and 54 deletions

View File

@ -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,7 +172,7 @@ class AdminAccountPage extends Form
}
$this->addElement(
'note',
new Note(
'description',
array(
'value' => tp(
@ -182,6 +183,7 @@ class AdminAccountPage extends Form
count($choices)
)
)
)
);
}

View File

@ -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,12 +60,13 @@ class AuthBackendPage extends Form
public function createElements(array $formData)
{
$this->addElement(
'note',
new Note(
'description',
array(
'value' => sprintf(
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'
),
$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']) {

View File

@ -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,7 +27,7 @@ class AuthenticationPage extends Form
public function createElements(array $formData)
{
$this->addElement(
'note',
new Note(
'description',
array(
'value' => t(
@ -34,6 +35,7 @@ class AuthenticationPage extends Form
. ' Configuring backend specific details follows in a later step.'
)
)
)
);
$backendTypes = array();

View File

@ -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,7 +37,7 @@ class DbResourcePage extends Form
)
);
$this->addElement(
'note',
new Note(
'description',
array(
'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.'
)
)
)
);
if (isset($formData['skip_validation']) && $formData['skip_validation']) {

View File

@ -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,13 +28,14 @@ class GeneralConfigPage extends Form
public function createElements(array $formData)
{
$this->addElement(
'note',
new Note(
'description',
array(
'value' => t(
'Now please adjust all application and logging related configuration options to fit your needs.'
)
)
)
);
$appForm = new ApplicationConfigForm();

View File

@ -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,7 +35,7 @@ class LdapResourcePage extends Form
)
);
$this->addElement(
'note',
new Note(
'description',
array(
'value' => t(
@ -42,6 +43,7 @@ class LdapResourcePage extends Form
. 'be used to authenticate users logging in to Icinga Web 2.'
)
)
)
);
if (isset($formData['skip_validation']) && $formData['skip_validation']) {

View File

@ -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,11 +42,12 @@ class PreferencesPage extends Form
public function createElements(array $formData)
{
$this->addElement(
'note',
new Note(
'description',
array(
'value' => t('Please choose how Icinga Web 2 should store user preferences.')
)
)
);
$storageTypes = array();

View File

@ -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,18 +28,20 @@ class WelcomePage extends Form
public function createElements(array $formData)
{
$this->addElement(
'note',
new Note(
'welcome',
array(
'value' => t('%WELCOME%')
)
)
);
$this->addElement(
'note',
new Note(
'description',
array(
'value' => t('%DESCRIPTION%')
)
)
);
$this->addElement(
'text',