FHIRFLARE-IG-Toolkit/templates/_flash_messages.html
Sudo-JHare ca8668e5e5 V2.0 release.
Hapi Config Page.
retrieve bundles from server
split bundles to resources.
new upload page, and Package Registry CACHE
2025-05-04 22:55:36 +10:00

25 lines
1016 B
HTML

{# templates/_flash_messages.html #}
{# Check if there are any flashed messages #}
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{# Loop through messages and display them as Bootstrap alerts #}
{% for category, message in messages %}
{# Map Flask message categories (e.g., 'error', 'success', 'warning') to Bootstrap alert classes #}
{% set alert_class = 'alert-info' %} {# Default class #}
{% if category == 'error' or category == 'danger' %}
{% set alert_class = 'alert-danger' %}
{% elif category == 'success' %}
{% set alert_class = 'alert-success' %}
{% elif category == 'warning' %}
{% set alert_class = 'alert-warning' %}
{% endif %}
<div class="alert {{ alert_class }} alert-dismissible fade show" role="alert">
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{% endfor %}
{% endif %}
{% endwith %}