{% extends '@OroUI/actions/update.html.twig' %} {% if entity.id %} {% oro_title_set({params : {'%title%': entity.alias} }) %} {% endif %} {% set formAction = formAction|default(entity.id ? path('oro_cms_content_block_update', { 'id': entity.id }) : path('oro_cms_content_block_create')) %} {% block pageHeader %} {% if entity.id %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('oro_cms_content_block_index'), 'indexLabel': 'oro.cms.contentblock.entity_plural_label'|trans, 'entityTitle': entity.alias|default('N/A'|trans) } %} {{ parent() }} {% else %} {% set title = 'oro.ui.create_entity'|trans({'%entityName%': 'oro.cms.contentblock.entity_label'|trans}) %} {% include '@OroUI/page_title_block.html.twig' with { title: title } %} {% endif %} {% endblock pageHeader %} {% block navButtons %} {% import '@OroUI/macros.html.twig' as UI %} {{ parent() }} {{ UI.cancelButton(path('oro_cms_content_block_index')) }} {% set html = UI.saveAndCloseButton({ 'route': 'oro_cms_content_block_view', 'params': { 'id': '$id' } }) %} {% if is_granted('oro_cms_content_block_update') %} {% set html = html ~ UI.saveAndStayButton({ 'route': 'oro_cms_content_block_update', 'params': { 'id': '$id' } }) %} {% endif %} {{ UI.dropdownSaveButton({'html': html}) }} {% endblock navButtons %} {% block content_data %} {% set id = 'contentblock-edit' %} {% set dataBlocks = [ { 'title': 'oro.cms.contentblock.sections.general.label'|trans, 'class': 'active', 'subblocks': [{ 'title': '', 'data': [ form_row(form.alias), form_row(form.titles), form_row(form.enabled) ] }] }, { 'title': 'oro.cms.contentblock.sections.use_for.label'|trans, 'subblocks': [{ 'title': '', 'data': [form_widget(form.scopes)] }] }, { 'title': 'oro.cms.contentblock.content_variants.entity_plural_label'|trans, 'subblocks': [{ 'title': '', 'data': [form_widget(form.contentVariants)] }] } ] %} {% set dataBlocks = dataBlocks|merge(oro_form_additional_data(form, 'Additional'|trans)) %} {% set data = { 'formErrors': form_errors(form), 'dataBlocks': dataBlocks } %} {{ parent() }} {% endblock content_data %}