diff --git a/application/controllers/EventRuleController.php b/application/controllers/EventRuleController.php index fe002f48b..4b4bd3744 100644 --- a/application/controllers/EventRuleController.php +++ b/application/controllers/EventRuleController.php @@ -86,10 +86,10 @@ public function indexAction(): void ->on(EventRuleConfigForm::ON_DISCARD, function () use ($config) { $ruleId = $config['id']; $this->sessionNamespace->delete($ruleId); + Notification::success(sprintf(t('Successfully discarded changes to event rule %s'), $config['name'])); $this->redirectNow(Links::eventRule($ruleId)); }) ->on(EventRuleConfigForm::ON_CHANGE, function (EventRuleConfigForm $form) use ($config) { - $formValues = $form->getValues(); $config = array_merge($config, $form->getValues()); $this->sessionNamespace->set($config['id'], $config); }) diff --git a/application/forms/EventRuleConfigForm.php b/application/forms/EventRuleConfigForm.php index e9c39b3a5..0baa6501c 100644 --- a/application/forms/EventRuleConfigForm.php +++ b/application/forms/EventRuleConfigForm.php @@ -163,7 +163,6 @@ protected function assemble() for ($i = 1; $i <= $escalationCount; $i++) { $escalationCondition = new EscalationCondition('escalation-condition_' . $i); $escalationRecipient = new EscalationRecipient('escalation-recipient_' . $i); - $this->registerElement($escalationCondition); $this->registerElement($escalationRecipient);