{# Form theme in the look of the apps template's Field.tsx: a real label, the hint and the error below the input, which gets aria-invalid and aria-describedby. #} {% extends 'form_div_layout.html.twig' %} {% block form_row %} {% set describedBy = [help ? id ~ '_help', errors|length ? id ~ '_errors']|filter(v => v) %} {% set widget_attr = {attr: {'aria-describedby': describedBy ? describedBy|join(' ')}|filter(v => v) |merge(errors|length ? {'aria-invalid': 'true'} : {})} %}
{{ help }}
{% endif %} {% endblock %} {% block form_errors %} {% if errors|length %}{%- for error in errors %}{{ error.message }}{% if not loop.last %} {% endif %}{% endfor -%}
{% endif %} {% endblock %} {# myep additions for the admin forms #} {% block textarea_widget %} {% set attr = attr|merge({class: 'input ' ~ (attr.class ?? '')}) %} {{ parent() }} {% endblock %} {# a list of boxes or radios, each in front of its label #} {% block choice_widget_expanded %}