{% load widget_tweaks %}
{% if field.is_hidden %}
{{ field }}
{% else %}
{% comment %}
Make the field widget type available to templates so we can
mark-up checkboxes differently to other widgets.
{% endcomment %}
{% block control_group %}
{% block controls %}
{% block widget %}
{# checkbox #}
{% if field|widget_type == 'checkboxinput' %}
{# radio #}
{% elif field|widget_type == 'radioselect' %}
{% else %}
{% if field.field.required %}
{{ field.label|safe }}
{% else %}
{{ field.label|safe }}
{% endif %}
{# multiple checkboxes #}
{% if field|widget_type == 'checkboxselectmultiple' %}
{% for checkbox in field %}