Replace Zend Note Element through Icingas Note Element

fixes #7318
fixes #7309
fixes #7307
This commit is contained in:
Alexander Fuhr 2014-09-26 16:32:07 +02:00
parent b2f12e1caa
commit 285d10ef22
7 changed files with 19 additions and 17 deletions

View File

@ -9,6 +9,7 @@ use DateInterval;
use Icinga\Module\Monitoring\Command\Instance\DisableNotificationsExpireCommand;
use Icinga\Module\Monitoring\Form\Command\CommandForm;
use Icinga\Web\Form\Element\DateTimePicker;
use Icinga\Web\Form\Element\Note;
use Icinga\Web\Notification;
use Icinga\Web\Request;
@ -33,12 +34,13 @@ class DisableNotificationsExpireCommandForm extends CommandForm
public function createElements(array $formData = array())
{
$this->addElement(
'note',
'command-info',
array(
'value' => mt(
'monitoring',
'This command is used to disable host and service notifications for a specific time.'
new Note(
'command-info',
array(
'value' => mt(
'monitoring',
'This command is used to disable host and service notifications for a specific time.'
)
)
)
);

View File

@ -8,6 +8,7 @@ use DateTime;
use DateInterval;
use Icinga\Module\Monitoring\Command\Object\AcknowledgeProblemCommand;
use Icinga\Web\Form\Element\DateTimePicker;
use Icinga\Web\Form\Element\Note;
use Icinga\Web\Notification;
use Icinga\Web\Request;
@ -34,8 +35,7 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm
public function createElements(array $formData = array())
{
$this->addElements(array(
array(
'note',
new Note(
'command-info',
array(
'value' => mt(

View File

@ -5,6 +5,7 @@
namespace Icinga\Module\Monitoring\Form\Command\Object;
use Icinga\Module\Monitoring\Command\Object\AddCommentCommand;
use Icinga\Web\Form\Element\Note;
use Icinga\Web\Notification;
use Icinga\Web\Request;
@ -31,8 +32,7 @@ class AddCommentCommandForm extends ObjectsCommandForm
public function createElements(array $formData = array())
{
$this->addElements(array(
array(
'note',
new Note(
'command-info',
array(
'value' => mt(

View File

@ -6,6 +6,7 @@ namespace Icinga\Module\Monitoring\Form\Command\Object;
use Icinga\Module\Monitoring\Command\Object\ScheduleHostCheckCommand;
use Icinga\Module\Monitoring\Command\Object\ScheduleServiceCheckCommand;
use Icinga\Web\Form\Element\Note;
use Icinga\Web\Notification;
use Icinga\Web\Request;
@ -30,8 +31,7 @@ class CheckNowCommandForm extends ObjectsCommandForm
public function addSubmitButton()
{
$this->addElements(array(
array(
'note', // Bogus
new Note(
'icon', // Bogus
array(
'decorators' => array(array(

View File

@ -8,6 +8,7 @@ use DateTime;
use DateInterval;
use Icinga\Module\Monitoring\Command\Object\ScheduleServiceCheckCommand;
use Icinga\Web\Form\Element\DateTimePicker;
use Icinga\Web\Form\Element\Note;
use Icinga\Web\Notification;
use Icinga\Web\Request;
@ -36,8 +37,7 @@ class ScheduleServiceCheckCommandForm extends ObjectsCommandForm
$checkTime = new DateTime();
$checkTime->add(new DateInterval('PT1H'));
$this->addElements(array(
array(
'note',
new Note(
'command-info',
array(
'value' => mt(

View File

@ -8,6 +8,7 @@ use DateTime;
use DateInterval;
use Icinga\Module\Monitoring\Command\Object\ScheduleServiceDowntimeCommand;
use Icinga\Web\Form\Element\DateTimePicker;
use Icinga\Web\Form\Element\Note;
use Icinga\Web\Form\Element\Number;
use Icinga\Web\Notification;
use Icinga\Web\Request;
@ -48,8 +49,7 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm
$end = clone $start;
$end->add(new DateInterval('PT1H'));
$this->addElements(array(
array(
'note',
new Note(
'command-info',
array(
'value' => mt(

View File

@ -51,7 +51,7 @@ class RemoteInstanceForm extends Form
'Enter the username to use for connecting to the remote machine or leave blank for default'
)
)
);
);clear
$this->addElement(
'text',
'path',