{% extends '@OroUI/actions/update.html.twig' %} {% import '@OroUI/macros.html.twig' as UI %} {% oro_title_set({params : {"%name%": entity.name|default('N/A'|trans)}}) %} {% set formAction = entity.id ? path('oro_consent_update', { 'id': entity.id }) : path('oro_consent_create') %} {% block navButtons %} {% import '@OroUI/macros.html.twig' as UI %} {{ parent() }} {{ UI.cancelButton(path('oro_consent_index')) }} {% set html = UI.saveAndCloseButton({ 'route': 'oro_consent_view', 'params': {'id': '$id'} }) %} {% if is_granted('oro_consent_create') %} {% set html = html ~ UI.saveAndNewButton({ 'route': 'oro_consent_create' }) %} {% endif %} {% if is_granted('oro_consent_update') %} {% set html = html ~ UI.saveAndStayButton({ 'route': 'oro_consent_update', 'params': {'id': '$id'} }) %} {% endif %} {{ UI.dropdownSaveButton({'html': html}) }} {% endblock navButtons %} {% block pageHeader %} {% if entity.id %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('oro_consent_index'), 'indexLabel': 'oro.consent.entity_plural_label'|trans, 'entityTitle': entity.name|default('N/A'|trans) } %} {{ parent() }} {% else %} {% set title = 'oro.ui.create_entity'|trans({'%entityName%': 'oro.consent.entity_label'|trans}) %} {% include '@OroUI/page_title_block.html.twig' with { title: title } %} {% endif %} {% endblock pageHeader %} {% block content_data %} {% import '@OroUI/macros.html.twig' as UI %} {% set id = 'consent-edit' %} {% set contentNodeAttr = { 'view': 'orowebcatalog/js/app/views/content-node-from-webcatalog-view', 'options': { 'listenedFieldName': form.webcatalog.vars.full_name, 'triggeredFieldName': form.content_node.vars.full_name } } %} {% set contentNode %} {% endset %} {% set dataBlocks = [ { 'title': 'oro.consent.sections.general'|trans, 'class': 'active', 'subblocks': [{ 'data': [ form_row(form.names), form_row(form.mandatory), form_row(form.declinedNotification), contentNode ] }] } ] %} {% set dataBlocks = dataBlocks|merge(oro_form_additional_data(form, 'Additional'|trans)) %} {% set data = { 'formErrors': form_errors(form), 'dataBlocks': dataBlocks }%} {{ parent() }} {% endblock content_data %}