{% extends '@OroUI/actions/update.html.twig' %} {% import '@OroDataGrid/macros.html.twig' as dataGrid %} {% set entityId = entity.id %} {% if entityId %} {% oro_title_set({params : {"%title%": entity.defaultTitle.string, '%entityName%': 'oro.cms.page.entity_label'|trans} }) %} {% else %} {% oro_title_set({params : {'%entityName%': 'oro.cms.page.entity_label'|trans} }) %} {% endif %} {% set formAction = entityId ? path('oro_cms_page_update', { 'id': entityId }) : path('oro_cms_page_create') %} {% block breadcrumbs %} {% import '@OroUI/macros.html.twig' as UI %} {{ parent() }} {% if entity.draftUuid %} {{ UI.badge('oro.draft.label'|trans, 'tentatively') }} {% endif %} {% endblock breadcrumbs %} {% block navButtons %} {% import '@OroUI/macros.html.twig' as UI %} {{ parent() }} {{ UI.cancelButton(path('oro_cms_page_index')) }} {% set html = '' %} {% if is_granted('oro_cms_page_view') %} {% set html = html ~ UI.saveAndCloseButton({ 'route' : 'oro_cms_page_view', 'params' : {'id': '$id'} }) %} {% endif %} {% if is_granted('oro_cms_page_update') %} {% set html = html ~ UI.saveAndStayButton({ 'route' : 'oro_cms_page_update', 'params': {'id': '$id'} }) %} {% endif %} {{ UI.dropdownSaveButton({'html': html}) }} {% endblock navButtons %} {% block pageHeader %} {% if entityId %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('oro_cms_page_index'), 'indexLabel': 'oro.cms.page.entity_plural_label'|trans, 'entityTitle': entity.defaultTitle.string|default('N/A'|trans) } %} {{ parent() }} {% else %} {% set title = 'oro.ui.create_entity'|trans({'%entityName%': 'oro.cms.page.entity_label'|trans}) %} {% include '@OroUI/page_title_block.html.twig' with { title: title } %} {% endif %} {% endblock pageHeader %} {% block content_data %} {% set id = 'page-edit' %} {% set pageContent %}
{{ form_widget(form.content) }} {{ form_widget(form.content_style) }} {{ form_widget(form.content_properties) }}
{% endset %} {% set dataBlocks = [ { 'title': 'oro.cms.sections.general'|trans, 'class': 'active', 'subblocks': [{ 'title': '', 'data': [ form_row(form.titles), form_row(form.slugPrototypesWithRedirect) ] }] }, { 'title': 'oro.cms.sections.content'|trans, 'subblocks': [{ 'title': '', 'data': [pageContent] }] } ] %} {% set dataBlocks = dataBlocks|merge(oro_form_additional_data(form, 'Additional'|trans)) %} {% set data = { 'formErrors': form_errors(form), 'dataBlocks': dataBlocks }%} {{ parent() }} {% endblock content_data %}