{% extends '@OroUI/actions/update.html.twig' %} {% if entity.id %} {% oro_title_set({params : {'%title%': entity.name} }) %} {% endif %} {% set formAction = formAction|default( entity.id ? path('oro_cms_content_widget_update', { 'id': entity.id }) : path('oro_cms_content_widget_create') ) %} {% block stats %} {% if is_granted('VIEW', entity, 'widgetType') and contentWidgetType is not empty %}
  • {{ 'oro.cms.contentwidget.widget_type.label'|trans }}: {{ contentWidgetType.label|trans }}
  • {% endif %} {{ parent() }} {% endblock stats %} {% block pageHeader %} {% if entity.id %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('oro_cms_content_widget_index'), 'indexLabel': 'oro.cms.contentwidget.entity_plural_label'|trans, 'entityTitle': entity.name|default('N/A'|trans) } %} {{ parent() }} {% else %} {% set title = 'oro.ui.create_entity'|trans({'%entityName%': 'oro.cms.contentwidget.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_widget_index')) }} {% set html = UI.saveAndCloseButton({ 'route': 'oro_cms_content_widget_view', 'params': { 'id': '$id' } }) %} {% if is_granted('oro_cms_content_widget_update') %} {% set html = html ~ UI.saveAndStayButton({ 'route': 'oro_cms_content_widget_update', 'params': { 'id': '$id' } }) %} {% endif %} {{ UI.dropdownSaveButton({'html': html}) }} {% endblock navButtons %} {% block content_data %} {% set id = 'contentwidget-page-edit' %} {% set data = { 'formErrors': form_errors(form), 'dataBlocks': form_data_blocks(form), 'hiddenData': form_rest(form) } %} {{ parent() }} {% endblock content_data %}