! RFACTOR TEMPLATE2
This commit is contained in:
@ -219,19 +219,17 @@
|
||||
<!-- Kontener do wyświetlania komunikatów flash -->
|
||||
<div class="container mt-3">
|
||||
{% with messages = get_flashed_messages(with_categories=True) %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
<!-- Jeśli brak kategorii, używamy 'info' -->
|
||||
{% if category == 'message' %}
|
||||
{% set category = 'info' %}
|
||||
{% endif %}
|
||||
<div class="alert alert-{{ category }} 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 %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
<!-- Zmapuj do stylu Bootstrapa -->
|
||||
{% set bs_cat = bootstrap_alert_category(category) %}
|
||||
<div class="alert alert-{{ bs_cat }} 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 %}
|
||||
</div>
|
||||
|
||||
<main class="container my-4 flex-fill">
|
||||
|
Reference in New Issue
Block a user