Skip to content

Commit

Permalink
Merge pull request #314 from OpenConext/bugfix/flash-messages
Browse files Browse the repository at this point in the history
Fix flash messages
  • Loading branch information
parijke authored Mar 6, 2024
2 parents b7db09b + 939aca2 commit b4d04a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<body>

{% block flashes %}

{#
The check is needed to prevent starting the session when looking for "flash messages":
https://symfony.com/doc/current/session.html#avoid-starting-sessions-for-anonymous-users
Expand All @@ -26,7 +27,7 @@
{% if flash_messages|length > 0 %}
<div class="row-fluid">
<div id="flash" class="span12">
{% for type, messages in app.flashes %}
{% for type, messages in flash_messages %}
{% for message in messages %}
<div class="alert alert-{{ type }} alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
Expand Down

0 comments on commit b4d04a3

Please sign in to comment.