{% extends '@OroUI/actions/update.html.twig' %} {% import '@OroUI/macros.html.twig' as UI %} {% set entityId = entity.id %} {% if entityId %} {% oro_title_set({params : {"%name%": entity.rule.name} }) %} {% else %} {% oro_title_set({params : {"%entityName%": 'oro.promotion.entity_label'|trans} }) %} {% endif %} {% set formAction = entityId ? path('oro_promotion_update', { 'id': entityId }) : path('oro_promotion_create') %} {% block navButtons %} {% import '@OroUI/macros.html.twig' as UI %} {{ UI.cancelButton(path('oro_promotion_index')) }} {% set html = '' %} {% if is_granted('oro_promotion_view') %} {% set html = html ~ UI.saveAndCloseButton({ 'route' : 'oro_promotion_view', 'params' : {'id': '$id'} }) %} {% endif %} {% if entityId or is_granted('oro_promotion_update') %} {% set html = html ~ UI.saveAndStayButton({ 'route' : 'oro_promotion_update', 'params' : {'id': '$id'} }) %} {% endif %} {{ UI.dropdownSaveButton({'html': html}) }} {% endblock navButtons %} {% block pageHeader %} {% if entityId %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('oro_promotion_index'), 'indexLabel': 'oro.promotion.entity_plural_label'|trans, 'entityTitle': entity.rule.name|default('N/A'|trans) } %} {{ parent() }} {% else %} {% set title = 'oro.ui.create_entity'|trans({'%entityName%': 'oro.promotion.entity_label'|trans}) %} {% include '@OroUI/page_title_block.html.twig' with { title: title } %} {% endif %} {% endblock pageHeader %} {% block content_data %} {% set id = 'promotion-edit' %} {% if form.rule.expression is defined%} {% set advancedConditions %} {% set collapseId = 'collapse-'|uniqid %}