{% extends '@OroUI/actions/update.html.twig' %} {% form_theme form with ['@OroAddress/Include/fields.html.twig', '@OroForm/Form/fields.html.twig'] %} {% oro_title_set({params : {"%lead.name%": entity.name} }) %} {% set formAction = form.vars.value.id ? path('oro_sales_lead_update', { 'id': form.vars.value.id }) : path('oro_sales_lead_create') %} {% block head_script %} {{ parent() }} {% block stylesheets %} {{ form_stylesheet(form) }} {% endblock %} {% endblock %} {% block navButtons %} {% import '@OroUI/macros.html.twig' as UI %} {% if form.vars.value.id and is_granted('DELETE', form.vars.value) %} {{ UI.deleteButton({ 'dataUrl': path('oro_api_delete_lead', {'id': form.vars.value.id}), 'dataRedirect': path('oro_sales_lead_index'), 'aCss': 'no-hash remove-button', 'id': 'btn-remove-lead', 'dataId': form.vars.value.id, 'entity_label': 'oro.sales.lead.entity_label'|trans }) }} {{ UI.buttonSeparator() }} {% endif %} {{ UI.cancelButton(path('oro_sales_lead_index')) }} {% set html = UI.saveAndCloseButton({ 'route': 'oro_sales_lead_view', 'params': {'id': '$id'} }) %} {% if is_granted('oro_sales_lead_create') %} {% set html = html ~ UI.saveAndNewButton({ 'route': 'oro_sales_lead_create' }) %} {% endif %} {% if form.vars.value.id or is_granted('oro_sales_lead_update') %} {% set html = html ~ UI.saveAndStayButton({ 'route': 'oro_sales_lead_update', 'params': {'id': '$id'} }) %} {% endif %} {{ UI.dropdownSaveButton({'html': html}) }} {% endblock %} {% block pageHeader %} {% if form.vars.value.id %} {% set breadcrumbs = { 'entity': form.vars.value, 'indexPath': path('oro_sales_lead_index'), 'indexLabel': 'oro.sales.lead.entity_plural_label'|trans, 'entityTitle': entity.name } %} {{ parent() }} {% else %} {% set title = 'oro.ui.create_entity'|trans({'%entityName%': 'oro.sales.lead.entity_label'|trans}) %} {% include '@OroUI/page_title_block.html.twig' with { title: title } %} {% endif %} {% endblock pageHeader %} {% block stats %}