Monitoring/Commands: Add help messages to the delay notification form

refs #4524
This commit is contained in:
Eric Lippmann 2013-08-16 12:27:48 +02:00 committed by Jannis Moßhammer
parent 329d63839b
commit bcdda6c0c6
1 changed files with 13 additions and 7 deletions

View File

@ -28,6 +28,8 @@
namespace Monitoring\Form\Command; namespace Monitoring\Form\Command;
use \Icinga\Web\Form\Element\Note;
/** /**
* Form for the delay notification command * Form for the delay notification command
*/ */
@ -40,11 +42,17 @@ class DelayNotificationForm extends CommandForm
/** /**
* Create the form's elements * Create the form's elements
*
* @see CommandForm::create()
*/ */
protected function create() protected function create()
{ {
$this->addElement(
new Note(
array(
'name' => 'commanddescription',
'value' => t('This command is used to delay the next problem notification that is sent out.')
)
)
);
$this->addElement( $this->addElement(
'text', 'text',
'minutes', 'minutes',
@ -65,12 +73,10 @@ class DelayNotificationForm extends CommandForm
) )
) )
); );
$this->addNote( $this->addNote(
t( t(
'Delay the next problem notification. The notification delay will be ' 'The notification delay will be disregarded if the host/service changes state before the next '
. 'disregarded if the host/service changes state before the next notification is ' . 'notification is scheduled to be sent out.'
. 'scheduled to be sent out.'
) )
); );
@ -81,6 +87,6 @@ class DelayNotificationForm extends CommandForm
public function getDelayTime() public function getDelayTime()
{ {
return $this->getValue('minutes')*60; return $this->getValue('minutes') * 60;
} }
} }