form-messages.html.twig 373 B

123456
  1. {% if form.message %}
  2. {% set icon_mapping = {'success':'checkmark', 'error':'wrong', 'warning':'information'} %}
  3. {% set message = form.inline_errors and form.messages ? "FORM.VALIDATION_FAIL"|t : form.message %}
  4. <div class="toast toast-{{ form.status }} mt-2 mb-2"><i class="icon dripicons-{{ icon_mapping[form.status] }}"></i> {{ message }}</div>
  5. {% endif %}