{% extends "includes/form/form-control.html.twig" %}
{% set checked = checked | default(false) %}
{% set style = style | default('default') %}
{% set type = type | default('checkbox') %}
{% set styleClasses = {
'default': '',
'switch': 'form-switch'
} %}
{% set className = className|default('') ~ ' form-check ' ~ attribute(styleClasses, style) %}
{% block input %}
<input class="form-check-input {{ attribute(classNames, 'input') }} {{ (errors | length > 0 )? 'is-invalid': '' }}"
{{ checked ? 'checked': '' }}
{% for key, value in inputAttributes %}
{{ key }}="{{ value }}"
{% endfor %} >
{% endblock %}
{% block label %}
{{ include('includes/form/form-elements/form-control-label.html.twig', _context | merge({
className : 'form-check-label' ~ classNames.label
}), with_context = false) }}
{% endblock %}