aboutsummaryrefslogtreecommitdiff
path: root/qc_app/templates/flash_messages.html
blob: b7af178912e0debd79a32552794cd44f94805291 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{%macro flash_all_messages()%}
{%with messages = get_flashed_messages(with_categories=true)%}
{%if messages:%}
<ul>
  {%for category, message in messages:%}
  <li class="{{category}}">{{message}}</li>
  {%endfor%}
</ul>
{%endif%}
{%endwith%}
{%endmacro%}

{%macro flash_messages(filter_class)%}
{%with messages = get_flashed_messages(with_categories=true)%}
{%if messages:%}
<ul>
  {%for category, message in messages:%}
  {%if filter_class in category%}
  <li class="{{category}}">{{message}}</li>
  {%endif%}
  {%endfor%}
</ul>
{%endif%}
{%endwith%}
{%endmacro%}