atst/templates/fragments/flash.html
2019-01-17 08:47:23 -05:00

14 lines
510 B
HTML

{% from "components/alert.html" import Alert %}
{% if not category_filter %}
{% set category_filter=["success", "info", "warning", "error"] %}
{% endif %}
{% with messages = get_flashed_messages(with_categories=true, category_filter=category_filter) %}
{% if messages %}
{% for category, message_config in messages %}
{{ Alert(message_config["title"], message=message_config.get("message"), actions=message_config.get("actions"), level=category) }}
{% endfor %}
{% endif %}
{% endwith %}