From 6f8fc3eb6d896cdf92ff09c3a195dace578e1e85 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 4 Sep 2014 15:30:54 +0200 Subject: [PATCH] modules/command: Add command description to `DisableNotificationsCommandForm' refs #6593 --- .../Instance/DisableNotificationsCommandForm.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/forms/Command/Instance/DisableNotificationsCommandForm.php b/modules/monitoring/application/forms/Command/Instance/DisableNotificationsCommandForm.php index 8bf918631..43263cb84 100644 --- a/modules/monitoring/application/forms/Command/Instance/DisableNotificationsCommandForm.php +++ b/modules/monitoring/application/forms/Command/Instance/DisableNotificationsCommandForm.php @@ -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; }