mirror of
https://github.com/YunoHost/doc.git
synced 2024-09-03 20:06:26 +02:00
6 lines
No EOL
469 B
Twig
6 lines
No EOL
469 B
Twig
{% if form.message %}
|
|
{% set inline_errors = form.inline_errors is not null ? form.inline_errors : config.plugins.form.inline_errors(false) %}
|
|
{% set status_mapping = {'success':'green', 'error': 'red', 'warning': 'yellow'} %}
|
|
{% set message = inline_errors and form.messages ? "GRAV.FORM.VALIDATION_FAIL"|t : form.message %}
|
|
<div class="toast toast-{{ form.status }} {{ status_mapping[form.status] ?: 'green' }} mt-2 mb-2">{{ message|raw }}</div>
|
|
{% endif %} |