modules/command: Add command description to `DisableNotificationsCommandForm'

refs #6593
This commit is contained in:
Eric Lippmann 2014-09-04 15:30:54 +02:00
parent ed645b1eeb
commit 6f8fc3eb6d
1 changed files with 11 additions and 1 deletions

View File

@ -32,6 +32,16 @@ class DisableNotificationsCommandForm 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.'
)
)
);
$expire = new DateTime();
$expire->add(new DateInterval('PT1H'));
$this->addElement(
@ -69,7 +79,7 @@ class DisableNotificationsCommandForm extends CommandForm
->disable()
->setExpire($this->getElement('expire')->getValue());
$this->getTransport($request)->send($toggleNotifications);
Notification::success(mt('monitoring', 'Command sent'));
Notification::success(mt('monitoring', 'Disabling host and service notifications..'));
return true;
}