Skip to content

Commit

Permalink
Replace Zend Note Element through Icingas Note Element
Browse files Browse the repository at this point in the history
fixes #7318
fixes #7309
fixes #7307
  • Loading branch information
Alexander Fuhr committed Sep 26, 2014
1 parent b2f12e1 commit 285d10e
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 17 deletions.
Expand Up @@ -9,6 +9,7 @@
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;

Expand All @@ -33,12 +34,13 @@ public function init()
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.'
)
)
)
);
Expand Down
Expand Up @@ -8,6 +8,7 @@
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;

Expand All @@ -34,8 +35,7 @@ public function getSubmitLabel()
public function createElements(array $formData = array())
{
$this->addElements(array(
array(
'note',
new Note(
'command-info',
array(
'value' => mt(
Expand Down
Expand Up @@ -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;

Expand All @@ -31,8 +32,7 @@ public function getSubmitLabel()
public function createElements(array $formData = array())
{
$this->addElements(array(
array(
'note',
new Note(
'command-info',
array(
'value' => mt(
Expand Down
Expand Up @@ -6,6 +6,7 @@

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;

Expand All @@ -30,8 +31,7 @@ public function init()
public function addSubmitButton()
{
$this->addElements(array(
array(
'note', // Bogus
new Note(
'icon', // Bogus
array(
'decorators' => array(array(
Expand Down
Expand Up @@ -8,6 +8,7 @@
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;

Expand Down Expand Up @@ -36,8 +37,7 @@ public function createElements(array $formData = array())
$checkTime = new DateTime();
$checkTime->add(new DateInterval('PT1H'));
$this->addElements(array(
array(
'note',
new Note(
'command-info',
array(
'value' => mt(
Expand Down
Expand Up @@ -8,6 +8,7 @@
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;
Expand Down Expand Up @@ -48,8 +49,7 @@ public function createElements(array $formData = array())
$end = clone $start;
$end->add(new DateInterval('PT1H'));
$this->addElements(array(
array(
'note',
new Note(
'command-info',
array(
'value' => mt(
Expand Down
Expand Up @@ -51,7 +51,7 @@ public function createElements(array $formData)
'Enter the username to use for connecting to the remote machine or leave blank for default'
)
)
);
);clear
$this->addElement(
'text',
'path',
Expand Down

0 comments on commit 285d10e

Please sign in to comment.