|
- {% set item = entity.instance %}
- {% set property_name = field.getProperty() %}
- {% set id_toggle = 'toggle-'~item.id~'-'~property_name %}
-
- {% block toggle %}
- <div class="custom-control custom-switch custom-switch-on-success custom-switch-off-default"
- data-url="{{ ea_url({crudAction: 'edit', entityId: item.id, fieldName: property_name }) }}">
- <input type="checkbox" class="custom-control-input" id="{{ id_toggle }}" {{ field.value ? 'checked' }}>
- <label class="custom-control-label" for="{{ id_toggle }}">
- {% block label %}
- {{ field.getCustomOption('toggle_label') ? field.label : field.property|sov_trans_admin_field(entity.instance) }}
- {% endblock label %}
- </label>
- </div>
- {% endblock toggle %}
|