This commit is contained in:
2022-02-08 19:37:59 +01:00
parent 6b571e87b4
commit 1e81256404
8 changed files with 36 additions and 33 deletions

View File

@@ -235,7 +235,9 @@ class NotificationController extends AbstractController
'id' => $notification->getId(),
'_fragment' => 'comment-' . $commentId,
]);
} elseif ($editedCommentForm->isSubmitted() && !$editedCommentForm->isValid()) {
}
if ($editedCommentForm->isSubmitted() && !$editedCommentForm->isValid()) {
$this->addFlash('error', $this->translator->trans('This form contains errors'));
}
}
@@ -258,7 +260,9 @@ class NotificationController extends AbstractController
return $this->redirectToRoute('chill_main_notification_show', [
'id' => $notification->getId(),
]);
} elseif ($appendCommentForm->isSubmitted() && !$appendCommentForm->isValid()) {
}
if ($appendCommentForm->isSubmitted() && !$appendCommentForm->isValid()) {
$this->addFlash('error', $this->translator->trans('This form contains errors'));
}
}