2016-02-01 12:15:38 +00:00
|
|
|
{% from "components/banner.html" import banner %}
|
|
|
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
|
|
|
{% if messages %}
|
|
|
|
|
{% for category, message in messages %}
|
2017-04-18 13:14:40 +01:00
|
|
|
<div class="bottom-gutter">
|
|
|
|
|
{{ banner(
|
2018-11-15 17:14:03 +00:00
|
|
|
message if message is string else message[0],
|
2017-04-18 13:14:40 +01:00
|
|
|
'default' if ((category == 'default') or (category == 'default_with_tick')) else 'dangerous',
|
2018-12-05 10:58:27 +00:00
|
|
|
delete_button="Yes, {}".format(category) if category in ['cancel', 'delete', 'suspend', 'resume', 'remove', 'revoke this API key'] else None,
|
2018-11-15 17:14:03 +00:00
|
|
|
with_tick=True if category == 'default_with_tick' else False,
|
|
|
|
|
context=message[1] if message is not string
|
2017-04-18 13:14:40 +01:00
|
|
|
)}}
|
|
|
|
|
</div>
|
2016-02-01 12:15:38 +00:00
|
|
|
{% endfor %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endwith %}
|