templates: reorder field elements to have label/hint/control/error (#75808)
gitea/gadjo/pipeline/head This commit looks good Details

This commit is contained in:
Frédéric Péters 2023-03-25 13:59:26 +01:00
parent d65d2e0e2f
commit f00aed535a
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>