{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #} {% use '@EasyAdmin/crud/form_theme.html.twig' %} {% block form_row %} {% set row_attr = row_attr|merge({ class: row_attr.class|default('') ~ ' form-group' }) %}
{{- form_label(form) -}}
{% set has_prepend_html = ea.field.prepend_html|default(null) is not null %} {% set has_append_html = ea.field.append_html|default(null) is not null %} {% set has_input_groups = has_prepend_html or has_append_html %} {% if has_input_groups %}
{% endif %} {% if has_prepend_html %}
{{ ea.field.prepend_html|raw }}
{% endif %} {{ form_widget(form) }} {% if has_append_html %}
{{ ea.field.append_html|raw }}
{% endif %} {% if has_input_groups %}
{% endif %} {% set nullable_fields_fqcn = [ 'EasyCorp\Bundle\EasyAdminBundle\Field\DateTimeField', 'EasyCorp\Bundle\EasyAdminBundle\Field\DateField', 'EasyCorp\Bundle\EasyAdminBundle\Field\TimeField', ] %} {% if form.vars.ea_crud_form.ea_field.fieldFqcn|default(false) in nullable_fields_fqcn and ea.field.nullable|default(false) %}
{% endif %} {% set help_message = name|lc_trans_admin_help(form.parent.vars.data) %} {% if help_message != '' %} {{ help_message }} {% endif %} {{- form_errors(form) -}}
{% endblock form_row %} {% block form_label -%} {% if label is same as(false) -%} {%- endif -%} {%- endblock checkbox_radio_label %} {% block form_start %} {{ parent() }} {% if ea_crud_form.form_panels is defined %}
{% endif %} {% endblock form_start %} {% block ea_crud_widget_panels %}
{% for panel_name, panel_config in ea_crud_form.form_panels|filter(panel_config => not panel_config.form_tab or panel_config.form_tab == tab_name) %} {% set panel_has_header = panel_config.label|default(false) or panel_config.icon|default(false) %} {% set collapsible = panel_config.collapsible %} {% set collapsed = panel_config.collapsed %}
{% if panel_config.template is defined and panel_config.template is not null %} {% include panel_config.template %} {% else %}
{% if panel_has_header %} {#
#} {% if collapsible %} {% endif %} {% if panel_config.help|default(false) %}
{{ panel_config.help|raw }}
{% endif %} {% endif %}
{% endif %}
{% else %}
{% for field in form|filter(field => 'hidden' not in field.vars.block_prefixes and (not field.vars.ea_crud_form.form_tab or field.vars.ea_crud_form.form_tab == tab_name)) %} {{ form_row(field) }} {% endfor %}
{% endfor %}
{% endblock ea_crud_widget_panels %}