{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
{# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
{% extends ea.templatePath('layout') %}
{% form_theme edit_form with ea.crud.formThemes only %}
{% trans_default_domain ea.i18n.translationDomain %}
{% block body_id 'ea-edit-' ~ entity.name ~ '-' ~ entity.primaryKeyValue %}
{% block body_class 'ea-edit ea-edit-' ~ entity.name %}
{% block configured_head_contents %}
{{ parent() }}
{% for htmlContent in edit_form.vars.ea_crud_form.assets.headContents %}
{{ htmlContent|raw }}
{% endfor %}
{% endblock %}
{% block configured_body_contents %}
{{ parent() }}
{% for htmlContent in edit_form.vars.ea_crud_form.assets.bodyContents %}
{{ htmlContent|raw }}
{% endfor %}
{% endblock %}
{% block configured_stylesheets %}
{{ parent() }}
{% for css_asset in edit_form.vars.ea_crud_form.assets.cssFiles %}
{% endfor %}
{% endblock %}
{% block configured_javascripts %}
{{ parent() }}
{% for js_asset in edit_form.vars.ea_crud_form.assets.jsFiles %}
{% endfor %}
{% endblock %}
{% block content_title %}
{%- apply spaceless -%}
{% set default_title = ea.crud.defaultPageTitle('edit', entity.instance)|trans(ea.i18n.translationParameters, 'EasyAdminBundle') %}
{% set custom_title = ea.crud.customPageTitle('edit', entity.instance) %}
{{ custom_title is null ? default_title|raw : custom_title|trans(ea.i18n.translationParameters)|raw }}
{%- endapply -%}
{% endblock %}
{% block page_actions %}
{% for action in entity.actions %}
{{ include(action.templatePath, { action: action }, with_context = false) }}
{% endfor %}
{% endblock %}
{% block main %}
{% block edit_form %}
{{ form(edit_form) }}
{% endblock edit_form %}
{% block delete_form %}
{{ include('@EasyAdmin/crud/includes/_delete_form.html.twig', { entity_id: entity.primaryKeyValue }, with_context = false) }}
{% endblock delete_form %}
{% endblock %}
{% block body_javascript %}
{{ parent() }}
{{ include('@EasyAdmin/crud/includes/_select2_widget.html.twig') }}
{% endblock %}