Skip to content

Commit

Permalink
WIP3
Browse files Browse the repository at this point in the history
  • Loading branch information
raviks789 committed Feb 27, 2024
1 parent e152bf2 commit c40476a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion application/controllers/EventRuleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
})
Expand Down
1 change: 0 additions & 1 deletion application/forms/EventRuleConfigForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit c40476a

Please sign in to comment.