{% extends '@OroUI/actions/update.html.twig' %} {% set formAction = form.vars.value.id ? path('oro_contactus_reason_update', { 'id': form.vars.value.id }) : path('oro_contactus_reason_create') %} {% block navButtons %} {% import '@OroUI/macros.html.twig' as UI %} {% if form.vars.value.id and is_granted('oro_contactus_reason_delete') %} {{ UI.deleteButton({ 'dataUrl': path('oro_contactus_reason_delete', {'id': form.vars.value.id}), 'dataRedirect': path('oro_contactus_reason_index'), 'aCss': 'no-hash remove-button', 'id': 'btn-remove-contact-reason-form', 'dataId': form.vars.value.id, 'entity_label': 'oro.contactus.contactreason.entity_label'|trans, }) }} {{ UI.buttonSeparator() }} {% endif %} {{ UI.button({'path' : path('oro_contactus_reason_index'), 'title' : 'Cancel'|trans, 'label' : 'Cancel'|trans}) }} {% set html = UI.saveAndCloseButton({ 'route': 'oro_contactus_reason_index' }) %} {% if is_granted('oro_contactus_reason_create') %} {% set html = html ~ UI.saveAndNewButton({ 'route': 'oro_contactus_reason_create' }) %} {% endif %} {% if is_granted('oro_contactus_reason_update') %} {% set html = html ~ UI.saveAndStayButton({ 'route': 'oro_contactus_reason_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_contactus_reason_index'), 'indexLabel': 'oro.contactus.contactreason.entity_plural_label'|trans, 'entityTitle': entity.defaultTitle } %} {{ parent() }} {% else %} {% set title = 'oro.ui.create_entity'|trans({'%entityName%': 'oro.contactus.contactreason.entity_label'|trans}) %} {% include '@OroUI/page_title_block.html.twig' with { title: title } %} {% endif %} {% endblock pageHeader %} {% block content_data %} {% set id = 'contact-reason-form' %} {% set dataBlocks = [{ 'title': 'oro.contactus.block.general'|trans, 'class': 'nav-item active', 'subblocks': [ { 'data': [ form_row(form.titles) ] } ] }] %} {% set dataBlocks = dataBlocks|merge(oro_form_additional_data(form, 'Additional'|trans)) %} {% set data = { 'formErrors': form_errors(form)? form_errors(form) : null, 'dataBlocks': dataBlocks, } %} {{ parent() }} {% endblock content_data %}