core: fix help_text not always being shown on horizontal form

This commit is contained in:
Jens Langhammer 2020-06-05 17:01:46 +02:00
parent ed0094eba2
commit b0f426e51a
1 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,9 @@
{% if c.data.selected %} checked {% endif %}> {% if c.data.selected %} checked {% endif %}>
<label class="pf-c-form__label" for="{{ field.name }}-{{ forloop.counter0 }}">{{ c.choice_label }}</label> <label class="pf-c-form__label" for="{{ field.name }}-{{ forloop.counter0 }}">{{ c.choice_label }}</label>
</div> </div>
{% if field.help_text %}
<p class="pf-c-form__helper-text">{{ field.help_text }}</p>
{% endif %}
{% endfor %} {% endfor %}
{% elif field.field.widget|fieldtype == 'Select' %} {% elif field.field.widget|fieldtype == 'Select' %}
<label class="pf-c-form__label" for="{{ field.name }}-{{ forloop.counter0 }}"> <label class="pf-c-form__label" for="{{ field.name }}-{{ forloop.counter0 }}">
@ -28,6 +31,9 @@
</label> </label>
<div class="pf-c-form__horizontal-group"> <div class="pf-c-form__horizontal-group">
{{ field|css_class:"pf-c-form-control" }} {{ field|css_class:"pf-c-form-control" }}
{% if field.help_text %}
<p class="pf-c-form__helper-text">{{ field.help_text }}</p>
{% endif %}
</div> </div>
{% elif field.field.widget|fieldtype == 'CheckboxInput' %} {% elif field.field.widget|fieldtype == 'CheckboxInput' %}
<div class="pf-c-form__horizontal-group"> <div class="pf-c-form__horizontal-group">