{% extends 'OroUIBundle:actions:update.html.twig' %} {% import 'OroUIBundle::macros.html.twig' as UI %} {% oro_title_set({params : {"%name%": entity.name|default('N/A'|trans)}}) %} {% set formAction = entity.id ? path('oro_warehouse_update', { 'id': entity.id }) : path('oro_warehouse_create') %} {% block navButtons %} {{ parent() }} {{ UI.cancelButton(path('oro_warehouse_index')) }} {% set html = UI.saveAndCloseButton() %} {% if entity.id or resource_granted('oro_warehouse_update') %} {% set html = html ~ UI.saveAndStayButton() %} {% endif %} {{ UI.dropdownSaveButton({'html': html}) }} {% endblock navButtons %} {% block pageHeader %} {% if entity.id %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('oro_warehouse_index'), 'indexLabel': 'oro.warehouse.entity_plural_label'|trans, 'entityTitle': entity.name|default('N/A'|trans) } %} {{ parent() }} {% else %} {% set title = 'oro.ui.create_entity'|trans({'%entityName%': 'oro.warehouse.entity_label'|trans}) %} {% include 'OroUIBundle::page_title_block.html.twig' with { title: title } %} {% endif %} {% endblock pageHeader %} {% block content_data %} {% set id = 'warehouse-edit' %} {% set dataBlocks = [ { 'title': 'oro.warehouse.sections.general'|trans, 'class': 'active', 'subblocks': [{ 'data': [ form_row(form.name) ] }] } ] %} {% set additionalData = [] %} {% for child in form.children if child.vars.extra_field is defined and child.vars.extra_field %} {% set additionalData = additionalData|merge([form_row(child)]) %} {% endfor %} {% if additionalData is not empty %} {% set dataBlocks = dataBlocks|merge([{ 'title': 'oro.warehouse.sections.additional'|trans, 'subblocks': [{ 'title': '', 'useSpan': false, 'data' : additionalData }] }] ) %} {% endif %} {% set data = { 'formErrors': form_errors(form), 'dataBlocks': dataBlocks }%} {{ parent() }} {% endblock content_data %}