diff --git a/modules/monitoring/application/forms/Command/Instance/DisableNotificationsExpireCommandForm.php b/modules/monitoring/application/forms/Command/Instance/DisableNotificationsExpireCommandForm.php
index 4ebe83c58..67d2c7fc6 100644
--- a/modules/monitoring/application/forms/Command/Instance/DisableNotificationsExpireCommandForm.php
+++ b/modules/monitoring/application/forms/Command/Instance/DisableNotificationsExpireCommandForm.php
@@ -71,5 +71,4 @@ class DisableNotificationsExpireCommandForm extends CommandForm
Notification::success(mt('monitoring', 'Disabling host and service notifications..'));
return true;
}
-
}
diff --git a/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php b/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php
index db584bc1a..9b3f79801 100644
--- a/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php
+++ b/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php
@@ -59,6 +59,21 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
*/
public function createElements(array $formData = array())
{
+ if ((bool) $this->status->notifications_enabled) {
+ $description = sprintf(
+ '%s',
+ mt('monitoring', 'Disable notifications for a specific time on a program-wide basis'),
+ $this->getView()->href('monitoring/process/disable-notifications'),
+ mt('monitoring', 'Disable temporarily')
+ );
+ } elseif ($this->status->disable_notif_expire_time) {
+ $description = sprintf(
+ mt('monitoring', 'Notifications will be re-enabled in %s'),
+ $this->getView()->timeUntil($this->status->disable_notif_expire_time)
+ );
+ } else {
+ $description = '';
+ }
$this->addElements(array(
array(
'checkbox',
@@ -97,7 +112,18 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
ToggleInstanceFeatureCommand::FEATURE_NOTIFICATIONS,
array(
'label' => mt('monitoring', 'Notifications Enabled'),
- 'autosubmit' => true
+ 'autosubmit' => true,
+ 'description' => $description,
+ 'decorators' => array(
+ 'ViewHelper',
+ 'Errors',
+ array(
+ 'Description',
+ array('tag' => 'span', 'class' => 'feature-instance-notifications', 'escape' => false)
+ ),
+ 'Label',
+ array('HtmlTag', array('tag' => 'div'))
+ ),
)
),
array(