<div is="form-row" class="{% if field.errors -%} has-error{% endif -%}">
    <div class="{{ classes.label }}"></div>
    <div class="field {{ classes.field }}">
        <div class="checkbox">
            {% set label_att = {'is': 'form-label'} -%}
            {% if field.auto_id -%}
                {% do label_att.update({'for': field.auto_id}) -%}
            {% endif -%}
            {% if field.field.required -%}
                {% do tpl.add_css_classes_to_dict(label_att, 'required') -%}
            {% endif -%}
            <label{{ tpl.json_flatatt(label_att) }}>
                {{ field|safe }} <span>{{ field.label }}</span>
            </label>
            {% for error in field.errors -%}
            <div class="alert alert-warning">{{ error }}</div>
            {% endfor -%}
            {% if field.help_text -%}
            <p class="help-block">
                {{ field.help_text|safe }}
            </p>
            {% endif -%}
        </div>
    </div>
</div>
