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

Open in your IDE?
  1. {% set errors = errors | default([]) %}
  2. <div class="custom-radio form-check {{ (errors | length > 0) ? 'has-error': '' }}
  3.             {{ disabled|default(null) ? 'disabled' : '' }} {{ styleModifier|default('') }}">
  4.     <label>
  5.         <input class="custom-radio__input form-check-input {{ (errors | length > 0 )? 'is-invalid': '' }} {{ inputModifier|default('') }}"
  6.                type="radio"
  7.                name="{{ name }}"
  8.                id="{{ id }}"
  9.         {{ required|default(null) ? 'required' : '' }}
  10.         {{ disabled|default(null) ? 'disabled' : '' }}
  11.         {{ checked|default(null) ? 'checked' : '' }}
  12.         {% for key, value in inputAttributes | default([]) %}
  13.             {{key}}="{{value}}"
  14.         {% endfor %}
  15.         >
  16.         <span class="custom-radio__box"></span>
  17.         <span class="custom-radio__text form-check-label">
  18.             {{ label }}
  19.             {% if required|default(null) %}
  20.                 {% if not noRequireHelper %}
  21.                     <span title="Pflichtfeld" aria-label="Pflichtfeld">*</span>
  22.                 {% endif %}
  23.             {% endif %}
  24.         </span>
  25.         {{ include('Form/Includes/form-errors.html.twig', _context) }}
  26.     </label>
  27. </div>