From 58434d97438a19aafa33eee3f942c67436fe8b63 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Fri, 15 May 2015 17:01:28 +0200 Subject: [PATCH] ToggleInstanceFeaturesCommandForm::onSuccess(): show a notification for each feature about whether it has been enabled or disabled fixes #9023 --- .../Instance/ToggleInstanceFeaturesCommandForm.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php b/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php index ec58bb4b6..79d15f5c1 100644 --- a/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php +++ b/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php @@ -215,8 +215,14 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm ->setFeature($feature) ->setEnabled($enabled); $this->getTransport($this->request)->send($toggleFeature); + + if ($this->status->{$feature} != $enabled) { + Notification::success($enabled + ? $this->translate('Enabling feature..') + : $this->translate('Disabling feature..') + ); + } } - Notification::success($this->translate('Toggling feature..')); return true; } }