Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

hemamaps / django-crispy-forms   python

Repository URL to install this package:

Version: 1.6.0 

/ templates / bootstrap4 / layout / radioselect.html

{% load crispy_forms_filters %}
{% load l10n %}

<div class="controls {{ field_class }}"{% if flat_attrs %} {{ flat_attrs|safe }}{% endif %}>
    {% include 'bootstrap4/layout/field_errors_block.html' %}

    {% for choice in field.field.choices %}
      {% if not inline_class %}<div class="radio">{% endif %}
        <label class="{% if inline_class %}radio-{{ inline_class }}{% endif %}">
            <input type="radio"{% if choice.0|stringformat:"s" == field.value|stringformat:"s" %} checked="checked"{% endif %} name="{{ field.html_name }}" id="id_{{ field.html_name }}_{{ forloop.counter }}" value="{{ choice.0|unlocalize }}" {{ field.field.widget.attrs|flatatt }}>
            {{ choice.1|unlocalize }}
        </label>
      {% if not inline_class %}</div>{% endif %}
    {% endfor %}

    {% include 'bootstrap4/layout/help_text.html' %}
</div>