templates/Form/Includes/checkbox.html.twig line 1

Open in your IDE?
  1. {% set errors = errors | default([]) %}
  2. {% if isTwoCol|default(false) %}<div class="col-md-6">{% endif %}
  3. <div class="custom-checkbox form-check {{ hasFormGroup|default(true) ? 'form-group' : '' }} {{ (errors | length > 0) ? 'has-error': '' }} {{ disabled|default(false) ? 'disabled' : '' }} {{ styleModifier|default('') }}">
  4.     <label>
  5.         <input
  6.             class="custom-checkbox__input form-check-input {{ (errors | length > 0 )? 'is-invalid': '' }} {{ inputModifier|default('') }}"
  7.             type="checkbox"
  8.             name="{{ name }}"
  9.             id="{{ id }}"
  10.             value="{{ value|default('checked') }}"
  11.         {{ required|default(false) ? 'required' : '' }}
  12.         {{ disabled|default(false) ? 'disabled' : '' }}
  13.         {{ checked|default(false) ? 'checked' : '' }}
  14.         {% for key, value in inputAttributes | default([]) %}
  15.             {{ key }}="{{ value }}"
  16.         {% endfor %}
  17.         >
  18.         <span class="custom-checkbox__box icon icon-checkmark"></span>
  19.         <span class="custom-checkbox__text form-check-label {{ textModifier | default(null) }}">
  20.             {{ label | raw }}
  21.             {% if required|default(false) %}
  22.                 {% if not noRequireHelper|default(false) %}
  23.                     <span title="Pflichtfeld" aria-label="Pflichtfeld">*</span>
  24.                 {% endif %}
  25.             {% endif %}
  26.         </span>
  27.         {{ include('Form/Includes/form-errors.html.twig', _context) }}
  28.         {{ include('Form/Includes/form-control-help-text.html.twig', _context) }}
  29.     </label>
  30. </div>
  31. {% if isTwoCol|default(false) %}</div>{% endif %}