mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 11:23:48 -05:00
25 lines
1.0 KiB
HTML
25 lines
1.0 KiB
HTML
{% from "components/banner.html" import banner %}
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
{% for category, message in messages %}
|
|
{% if category in ['cancel', 'delete', 'suspend', 'resume', 'remove', 'revoke this API key'] %}
|
|
{% set delete_button_text = "Yes, {}".format(category) %}
|
|
{% elif category == 'try again' %}
|
|
{% set delete_button_text = category|capitalize %}
|
|
{% else %}
|
|
{% set delete_button_text = None %}
|
|
{% endif %}
|
|
<div class="bottom-gutter">
|
|
{{ banner(
|
|
message if message is string else message[0],
|
|
'default' if ((category == 'default') or (category == 'default_with_tick')) else 'dangerous',
|
|
delete_button=delete_button_text,
|
|
with_tick=True if category == 'default_with_tick' else False,
|
|
context=message[1] if message is not string,
|
|
thing=message[2] if message is not string and message[2]
|
|
)}}
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|