form-messages.html.twig 468 B

123456
  1. {% if form.message %}
  2. {% set inline_errors = form.inline_errors is not null ? form.inline_errors : config.plugins.form.inline_errors(false) %}
  3. {% set status_mapping = {'success':'green', 'error': 'red', 'warning': 'yellow'} %}
  4. {% set message = inline_errors and form.messages ? "GRAV.FORM.VALIDATION_FAIL"|t : form.message %}
  5. <div class="notices {{ form.status }} {{ status_mapping[form.status] ?: 'green' }}"><p>{{ message|raw }}</p></div>
  6. {% endif %}