'main_menu' => '@LcSov/adminlte/block/menu.html.twig', | 'main_menu' => '@LcSov/adminlte/block/menu.html.twig', | ||||
'crud/index' => '@LcSov/adminlte/crud/index.html.twig', | 'crud/index' => '@LcSov/adminlte/crud/index.html.twig', | ||||
'crud/paginator' => '@LcSov/adminlte/crud/paginator.html.twig', | 'crud/paginator' => '@LcSov/adminlte/crud/paginator.html.twig', | ||||
'crud/edit' => '@LcSov/adminlte/crud/edit.html.twig', | |||||
'crud/new' => '@LcSov/adminlte/crud/new.html.twig', | |||||
'crud/edit' => '@LcSov/adminlte/crud/form.html.twig', | |||||
'crud/new' => '@LcSov/adminlte/crud/form.html.twig', | |||||
'flash_messages' => '@LcSov/adminlte/block/flash_messages.html.twig', | 'flash_messages' => '@LcSov/adminlte/block/flash_messages.html.twig', | ||||
] | ] | ||||
) | ) |
data-url="{{ ea_url({crudAction: 'edit', entityId: item.id, fieldName: property_name }) }}"> | 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' }}> | <input type="checkbox" class="custom-control-input" id="{{ id_toggle }}" {{ field.value ? 'checked' }}> | ||||
<label class="custom-control-label" for="{{ id_toggle }}"> | <label class="custom-control-label" for="{{ id_toggle }}"> | ||||
{{ field.getCustomOption('toggle_label') ?? field.label }}</label> | |||||
{{ field.getCustomOption('toggle_label') ? field.label : field.property|sov_trans_admin_field(entity.instance) }}</label> | |||||
</div> | </div> |
{{ widget|raw }} | {{ widget|raw }} | ||||
<span class="checkmark"></span> | <span class="checkmark"></span> | ||||
{# {% if translation_domain == 'lcshop' %} | |||||
{{ name|lc_trad(easyadmin['entity']['name'], 'field') }} | |||||
{% else %} #} | |||||
{{- label is not same as(false) ? (translation_domain is same as(false) ? label : label|trans(label_translation_parameters, translation_domain))|raw -}} | |||||
{# {{- label is not same as(false) ? (translation_domain is same as(false) ? label : label|trans(label_translation_parameters, translation_domain))|raw -}} #} | |||||
{% set entityNameOrObject = form.parent.vars.data %} | |||||
{% if not entityNameOrObject and form.parent.vars.errors.form.config.dataClass is defined %} | |||||
{% set entityNameOrObject = form.parent.vars.errors.form.config.dataClass %} | |||||
{% endif %} | |||||
{{- (label is not empty and '.' in label) ? label|trans({}, 'admin') : name|sov_trans_admin_field(entityNameOrObject) -}} | |||||
{# {% endif %} #} | |||||
{{- form_errors(form) -}} | {{- form_errors(form) -}} | ||||
</label> | </label> | ||||
{%- endif -%} | {%- endif -%} |