templates: reorder field elements to have label/hint/control/error (#75808) #11

Merged
fpeters merged 1 commits from wip/75808-invert-hint-and-error into main 2023-04-04 18:06:11 +02:00
1 changed files with 8 additions and 8 deletions

View File

@ -19,6 +19,14 @@
<div class="content"
{% if field.id_for_label %}aria-labelledby="{{ field.id_for_label }}_title"{% endif %}
{% block widget-attrs %}{% endblock %}>
{% block widget-hint %}
{% if field.help_text %}
<div class="hint">{{ field.help_text|safe }}</div>
{% endif %}
{% endblock %}
{% block widget-control %}
{{ field }}
{% endblock %}
{% block widget-error %}
{% if field.errors %}
<div class="error"><p>
@ -28,14 +36,6 @@
</p></div>
{% endif %}
{% endblock %}
{% block widget-control %}
{{ field }}
{% endblock %}
{% block widget-hint %}
{% if field.help_text %}
<div class="hint">{{ field.help_text|safe }}</div>
{% endif %}
{% endblock %}
</div>
{% endblock %}
</div>