puchar/crispy_forms/templates/bootstrap3/layout/checkboxselectmultiple.html

22 lines
895 B
HTML
Raw Normal View History

2022-12-05 04:12:09 +01:00
{% load crispy_forms_filters %}
{% load l10n %}
<div class="controls {{ field_class }}"{% if flat_attrs %} {{ flat_attrs }}{% endif %}>
{% include 'bootstrap3/layout/field_errors_block.html' %}
{% for group, options, index in field|optgroups %}
{% if group %}<strong>{{ group }}</strong>{% endif %}
{% for option in options %}
{% if not inline_class %}<div class="checkbox">{% endif %}
<label class="{% if inline_class %}checkbox-{{ inline_class }}{% endif %}" for="{{ option.attrs.id }}">
<input type="checkbox" name="{{ field.html_name }}" value="{{ option.value|unlocalize }}" {% include "bootstrap3/layout/attrs.html" with widget=option %}>
{{ option.label|unlocalize }}
</label>
{% if not inline_class %}</div>{% endif %}
{% endfor %}
{% endfor %}
{% include 'bootstrap3/layout/help_text.html' %}
</div>