You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
497B

  1. {% set item = entity.instance %}
  2. {% set property_name = field.getProperty() %}
  3. {% set id_toggle = 'toogle-'~item.id~'-'~property_name %}
  4. <div class="custom-control custom-switch custom-switch-on-primary custom-switch-off-default" data-propertyname="{{ property_name }}" data-id={{ item.id }}>
  5. <input type="checkbox" class="custom-control-input" id="{{ id_toggle }}" {{ field.value ? 'checked' }}>
  6. <label class="custom-control-label" for="{{ id_toggle }}">{{ field.label }}</label>
  7. </div>