templates/pages/blocks/form/checkbox.html.twig line 1

Open in your IDE?
  1.     {# {% set options = row.field_values|split('\n') %}
  2.     {% for option in options %}
  3.     {% if row.field_required %}
  4.     <div class="input-group mt-4 required">
  5.     {% endif %}
  6.         <div class="radio-block relative">
  7.             <input class="radio-input" type="checkbox" id="{{ row.field_name~'_'~option|replace({' & ': '_', '&amp;': '_' ,' ':'_','/':''})|lower}}" 
  8.             value="{{ option }}"
  9.             name="{{ row.field_name }}[]"
  10.        
  11.             
  12.             />
  13.             <label for="{{ row.field_name~'_'~option|replace({' & ': '_', '&amp;': '_' ,' ':'_' ,'/':''})|lower}}">{{ option }}</label>
  14.         </div>
  15.     
  16.     {% if row.field_required %}
  17.     </div>
  18.     {% endif %}
  19.     
  20.     {% endfor %} #}
  21. {# <input-checkbox v-model="getInTouch.terms"
  22.               :error-show="getInTouchErrors.terms"
  23.               name="terms"
  24.               required
  25.               error-text="This field is required">
  26.               <p class="text-sm text-blue">
  27.                 I agree to the <a class="whitespace-nowrap underline"
  28.                   target="blank"
  29.                   href="#">Terms and Conditions</a> and <a class="whitespace-nowrap underline"
  30.                   target="blank"
  31.                   href="./privacy-policy">Privacy Policy</a>
  32.               </p>
  33.             </input-checkbox> #}
  34. {% set currentLocale = app.request.locale %}
  35. {% if currentLocale == 'fr' %}
  36.   {% set policyUrl = './politique-de-confidentialit' %}
  37. {% endif %}
  38. {% if currentLocale == 'en' %}
  39.   {% set policyUrl = './privacy-policy' %}
  40. {% endif %}
  41. <div class="flex flex-col gap-4">
  42.     <div class="flex gap-[10px]">
  43.         <label class="checkbox-wrapp relative block block">
  44.         <span class="block relative w-5 h-5 cursor-pointer">
  45.         <input type="checkbox" name="terms" required="required" class="absolute inset-0 opacity-0 peer" value=""> 
  46.         <span class="checkbox-border absolute inset-0 block border rounded-[3px] shadow-transparent duration-200 border-blue peer-focus-visible:border-blue/50"></span> 
  47.         <span class="checkbox-checked absolute inset-0 flex items-center justify-center opacity-0 duration-200 peer-checked:opacity-100 bg-blue text-white">
  48.         <svg class="w-3 h-2 stroke-2">
  49.         <use xlink:href="#icon-check"></use>
  50.         </svg>
  51.         </span>
  52.         </span> <!---->
  53.         </label> 
  54.         <p class="text-sm text-blue">{{ "I agree to the Terms and Conditions and" | trans }} <a target="blank" href="{{policyUrl}}" class="whitespace-nowrap underline"> {{ "Privacy Policy" | trans }}</a></p>
  55.     </div> <!---->
  56. </div>