core: show multi-select notice for SelectMultiple Widgets

This commit is contained in:
Jens Langhammer 2020-12-26 00:43:29 +01:00
parent 5647f53140
commit f96c2db5df
1 changed files with 4 additions and 1 deletions

View File

@ -31,7 +31,7 @@
<p class="pf-c-form__helper-text">{{ field.help_text }}</p> <p class="pf-c-form__helper-text">{{ field.help_text }}</p>
{% endif %} {% endif %}
</div> </div>
{% elif field.field.widget|fieldtype == 'Select' %} {% elif field.field.widget|fieldtype == 'Select' or field.field.widget|fieldtype == "SelectMultiple" %}
<div class="pf-c-form__group-label"> <div class="pf-c-form__group-label">
<label class="pf-c-form__label" for="{{ field.name }}-{{ forloop.counter0 }}"> <label class="pf-c-form__label" for="{{ field.name }}-{{ forloop.counter0 }}">
<span class="pf-c-form__label-text">{{ field.label }}</span> <span class="pf-c-form__label-text">{{ field.label }}</span>
@ -46,6 +46,9 @@
{% if field.help_text %} {% if field.help_text %}
<p class="pf-c-form__helper-text">{{ field.help_text|safe }}</p> <p class="pf-c-form__helper-text">{{ field.help_text|safe }}</p>
{% endif %} {% endif %}
{% if field.field.widget|fieldtype == 'SelectMultiple' %}
<p class="pf-c-form__helper-text">{% trans 'Hold control/command to select multiple items.' %}</p>
{% endif %}
</div> </div>
</div> </div>
{% elif field.field.widget|fieldtype == 'CheckboxInput' %} {% elif field.field.widget|fieldtype == 'CheckboxInput' %}