{% extends '@OroUI/actions/update.html.twig' %} {% oro_title_set({params : {"%id%": entity.id|default('N/A'|trans)} }) %} {% set formAction = entity.id ? path('oro_payment_methods_configs_rule_update', { 'id': entity.id }) : path('oro_payment_methods_configs_rule_create') %} {% block pageHeader %} {% if entity.id %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('oro_payment_methods_configs_rule_index'), 'indexLabel': 'oro.payment.paymentmethodsconfigsrule.entity_short_plural_label'|trans, 'entityTitle': entity.rule.name|slice(0, 50) } %} {{ parent() }} {% else %} {% set breadcrumbs = { 'indexLabel': 'Create', 'entityTitle': 'Payment Rule', 'indexPath': path('oro_payment_methods_configs_rule_create') } %} {% set title = 'oro.ui.create_entity'|trans({'%entityName%': 'oro.payment.paymentmethodsconfigsrule.entity_short_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_payment_methods_configs_rule_index')) }} {% if entity.id and is_granted('oro_payment_methods_configs_rule_update') or is_granted('oro_payment_methods_configs_rule_create') %} {% set html = '' %} {% if is_granted('oro_payment_methods_configs_rule_view') %} {% set html = UI.saveAndCloseButton({ 'route': 'oro_payment_methods_configs_rule_view', 'params': {'id': '$id'} }) %} {% endif %} {% set html = html ~ UI.saveAndStayButton({ 'route': 'oro_payment_methods_configs_rule_update', 'params': {'id': '$id'} }) %} {{ UI.dropdownSaveButton({'html': html}) }} {% endif %} {% endblock navButtons %} {% block oro_payment_rule_add_method_widget %}