|
|
@@ -249,95 +249,36 @@ |
|
|
|
{%- endif -%} |
|
|
|
{%- endblock checkbox_radio_label %} |
|
|
|
|
|
|
|
{% block form_start %} |
|
|
|
|
|
|
|
{{ parent() }} |
|
|
|
|
|
|
|
{% if ea_crud_form.form_panels is defined %} |
|
|
|
<div class="card card-outline"> |
|
|
|
<div class="card-header p-0 border-bottom-0"> |
|
|
|
<ul id="nav-params" class="nav nav-pills" role="navigation"> |
|
|
|
{% 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) %} |
|
|
|
<li class="nav-item"> |
|
|
|
<a href="#panel-{{ panel_name }} " class="nav-link {{ panel_name == 1 ? 'active' }}" |
|
|
|
data-toggle="tab" role="tab" |
|
|
|
aria-controls="panel-{{ panel_name }}"> |
|
|
|
{{ panel_config.label|lc_trans_admin_panel(ea.getEntity().getFqcn()) }} |
|
|
|
<i class="fa fa-exclamation-circle invalid-form"></i> |
|
|
|
</a> |
|
|
|
</li> |
|
|
|
{% endfor %} |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{% endif %} |
|
|
|
{% endblock form_start %} |
|
|
|
|
|
|
|
{% block ea_crud_widget_panels %} |
|
|
|
<div class="tab-content"> |
|
|
|
{% 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 %} |
|
|
|
|
|
|
|
<div class="tab-pane {{ panel_name == 1 ? 'active' }}" id="panel-{{ panel_name }}" |
|
|
|
aria-labelledby="{{ panel_name }}-tab"> |
|
|
|
{% if panel_config.template is defined and panel_config.template is not null %} |
|
|
|
{% include panel_config.template %} |
|
|
|
{% else %} |
|
|
|
|
|
|
|
<div class="card {{ panel_config.css_class ?? '' }}"> |
|
|
|
<div class="card-status-top bg-primary"></div> |
|
|
|
{% if panel_has_header %} |
|
|
|
<div class="card-header "> |
|
|
|
{# <div class="content-panel-header {{ collapsible ? 'collapsible' }} {{ panel_config.help|default(false) is not empty ? 'with-help' }}"> #} |
|
|
|
{% if collapsible %} |
|
|
|
<a href="#content-{{ panel_name }}" data-toggle="collapse" |
|
|
|
class="content-panel-collapse {{ collapsed ? 'collapsed' }}" |
|
|
|
aria-expanded="{{ collapsed ? 'false' : 'true' }}" |
|
|
|
aria-controls="content-{{ panel_name }}"> |
|
|
|
<i class="fas fw fa-chevron-right collapse-icon"></i> |
|
|
|
{% endif %} |
|
|
|
|
|
|
|
{% if panel_config.icon|default(false) %} |
|
|
|
<i class="{{ panel_config.icon }}"></i> |
|
|
|
{% endif %} |
|
|
|
|
|
|
|
{{ panel_config.label|lc_trans_admin_panel(ea.getEntity().getFqcn()) }} |
|
|
|
|
|
|
|
{% if collapsible %} |
|
|
|
</a> |
|
|
|
{% endif %} |
|
|
|
|
|
|
|
{% if panel_config.help|default(false) %} |
|
|
|
<div class="content-panel-header-help">{{ panel_config.help|raw }}</div> |
|
|
|
{% endif %} |
|
|
|
</div> |
|
|
|
{% endif %} |
|
|
|
<div class="card-body {{ collapsible ? 'collapse' }} {{ not collapsed ? 'show' }}"> |
|
|
|
{% for field in form|filter(field => 'hidden' not in field.vars.block_prefixes and field.vars.ea_crud_form.form_panel == panel_name) %} |
|
|
|
{% if not field.vars.ea_crud_form.form_tab or field.vars.ea_crud_form.form_tab == tab_name %} |
|
|
|
{{ form_row(field) }} |
|
|
|
{% endif %} |
|
|
|
{% endfor %} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{% endif %} |
|
|
|
</div> |
|
|
|
|
|
|
|
{% else %} |
|
|
|
<div class="card"> |
|
|
|
<div class="card-status-top bg-primary"></div> |
|
|
|
<div class="card-body"> |
|
|
|
|
|
|
|
{% 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 %} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{% endfor %} |
|
|
|
</div> |
|
|
|
|
|
|
|
{% embed '@LcSov/adminlte/embed/tabs/tabs.html.twig' %} |
|
|
|
{# items menu #} |
|
|
|
{% import '@LcSov/adminlte/macro/tabs.html.twig' as mtabs %} |
|
|
|
{% block menu_items %} |
|
|
|
{% 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) %} |
|
|
|
{{ mtabs.menu_item(panel_name, loop.first, panel_config.label|lc_trans_admin_panel(ea.getEntity().getFqcn())) }} |
|
|
|
{% endfor %} |
|
|
|
{% endblock %} |
|
|
|
|
|
|
|
{# content #} |
|
|
|
{% block content %} |
|
|
|
{# panes #} |
|
|
|
{% 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) %} |
|
|
|
{% embed '@LcSov/adminlte/embed/tabs/pane.html.twig' %} |
|
|
|
{% block class %}{{ loop.first ? 'active' }}{% endblock %} |
|
|
|
{% block id %}{{ panel_name }}{% endblock %} |
|
|
|
{% block content %} |
|
|
|
{% for field in form|filter(field => 'hidden' not in field.vars.block_prefixes and field.vars.ea_crud_form.form_panel == panel_name) %} |
|
|
|
{% if not field.vars.ea_crud_form.form_tab or field.vars.ea_crud_form.form_tab == tab_name %} |
|
|
|
{{ form_row(field) }} |
|
|
|
{% endif %} |
|
|
|
{% endfor %} |
|
|
|
{% endblock %} |
|
|
|
{% endembed %} |
|
|
|
{% 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 %} |
|
|
|
{% endembed %} |
|
|
|
{% endblock ea_crud_widget_panels %} |