File: checkboxselectmultiple.html

package info (click to toggle)
python-crispy-bootstrap3 2024.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 500 kB
  • sloc: python: 1,815; makefile: 3
file content (21 lines) | stat: -rw-r--r-- 895 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{% 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>