kadenios/shared/templates/forms/select.html

22 lines
589 B
HTML
Raw Normal View History

2020-11-20 19:31:22 +01:00
{% load bulma_utils %}
<label class="label {% if field.field.required %}{{ form.required_css_class }}{% endif %}">
2020-12-19 15:28:32 +01:00
{{ field.label_tag }}
2020-11-20 19:31:22 +01:00
</label>
<div class="control is-expanded">
<span class="select is-fullwidth{% if field|is_multiple_select %} is-multiple{% endif %}{% if field.errors|length > 0 %} is-danger{% endif %}">
2020-11-20 19:31:22 +01:00
{{ field }}
</span>
{% for error in field.errors %}
2020-12-19 15:28:32 +01:00
<span class="help is-danger {{ form.error_css_class }}">{{ error }}</span>
2020-11-20 19:31:22 +01:00
{% endfor %}
{% if field.help_text %}
2020-12-19 15:28:32 +01:00
<p class="help">
{{ field.help_text|safe }}
</p>
2020-11-20 19:31:22 +01:00
{% endif %}
2020-12-19 15:28:32 +01:00
</div>