templates: reorder field elements to have label/hint/control/error (#75808) #11
|
@ -19,6 +19,14 @@
|
||||||
<div class="content"
|
<div class="content"
|
||||||
{% if field.id_for_label %}aria-labelledby="{{ field.id_for_label }}_title"{% endif %}
|
{% if field.id_for_label %}aria-labelledby="{{ field.id_for_label }}_title"{% endif %}
|
||||||
{% block widget-attrs %}{% endblock %}>
|
{% 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 %}
|
{% block widget-error %}
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
<div class="error"><p>
|
<div class="error"><p>
|
||||||
|
@ -28,14 +36,6 @@
|
||||||
</p></div>
|
</p></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block widget-control %}
|
|
||||||
{{ field }}
|
|
||||||
{% endblock %}
|
|
||||||
{% block widget-hint %}
|
|
||||||
{% if field.help_text %}
|
|
||||||
<div class="hint">{{ field.help_text|safe }}</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endblock %}
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue