ui: Use inline SVG icons for all error/warn/info/success messages

Tests:

- All the icons appear as before in both light/dark themes.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2026-03-12 15:36:22 -07:00 committed by James Valleroy
parent 53ee9c4ee2
commit 33d7bf641f
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -3,6 +3,7 @@
{% endcomment %}
{% load i18n %}
{% load plinth_extras %}
{% for message in messages %}
<div class="alert alert-{{ message.tags }} alert-dismissible
@ -10,16 +11,16 @@
role="alert">
<div class="me-2">
{% if message.tags == 'danger' %}
<span class="fa fa-exclamation-triangle" aria-hidden="true"></span>
{% icon 'exclamation-triangle' %}
<span class="visually-hidden">{% trans "Error:" %}</span>
{% elif message.tags == 'warning' %}
<span class="fa fa-exclamation-triangle" aria-hidden="true"></span>
{% icon 'exclamation-triangle' %}
<span class="visually-hidden">{% trans "Caution:" %}</span>
{% elif message.tags == 'info' %}
<span class="fa fa-info-circle" aria-hidden="true"></span>
{% icon 'info-circle' %}
<span class="visually-hidden">{% trans "Info:" %}</span>
{% elif message.tags == 'success' %}
<span class="fa fa-check-circle" aria-hidden="true"></span>
{% icon 'check-circle' %}
<span class="visually-hidden">{% trans "Success:" %}</span>
{% endif %}
</div>