{% extends '@OroUI/actions/update.html.twig' %} {% import '@OroQueryDesigner/macros.html.twig' as QD %} {% oro_title_set({params : { '%entity.name%': entity.entity, '%entityName%': 'oro.dotmailer.datafieldmapping.entity_label'|trans } }) %} {% set entityId = entity.id %} {% set formAction = form.vars.value.id ? path('oro_dotmailer_datafield_mapping_update', { 'id': form.vars.value.id }) : path('oro_dotmailer_datafield_mapping_create') %} {% block bodyClass %}dotmailer-page{% 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_dotmailer_datafield_mapping', {'id': form.vars.value.id}), 'dataRedirect': path('oro_dotmailer_datafield_mapping_index'), 'aCss': 'no-hash remove-button', 'dataId': form.vars.value.id, 'entity_label': 'oro.dotmailer.datafieldmapping.entity_label'|trans }) }} {{ UI.buttonSeparator() }} {% endif %} {{ UI.cancelButton(path('oro_dotmailer_datafield_mapping_index')) }} {% set html = '' %} {% if is_granted('oro_dotmailer_datafield_mapping_create') %} {% set html = html ~ UI.saveAndNewButton({ 'route': 'oro_dotmailer_datafield_mapping_create' }) %} {% endif %} {% if form.vars.value.id or is_granted('oro_dotmailer_datafield_mapping_update') %} {% set html = html ~ UI.saveAndStayButton({ 'route': 'oro_dotmailer_datafield_mapping_update', 'params': {'id': '$id'} }) %} {% endif %} {{ UI.dropdownSaveButton({'html': html}) }} {% endblock navButtons %} {% block pageHeader %} {% if entityId %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('oro_dotmailer_datafield_mapping_index'), 'indexLabel': 'oro.dotmailer.datafieldmapping.entity_plural_label'|trans, 'entityTitle': 'oro.dotmailer.datafieldmapping.entity_label'|trans } %} {{ parent() }} {% else %} {% set title = 'oro.ui.create_entity'|trans({'%entityName%': 'oro.dotmailer.datafieldmapping.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 %} {% import _self as dataFieldMappingUpdate %} {% set id = 'dotmailer-datafield-mapping-form' %} {% set type = 'oro_dotmailer_datafield_mapping' %} {% set dataBlocks = [{ 'title': 'oro.dotmailer.block.general'|trans, 'subblocks': [{ 'title': '', 'data': [ form_row(form.channel), form_row(form.entity), form_row(form.syncPriority) ] }] }] %} {% set dataBlocks = dataBlocks|merge( [{ 'title': 'oro.dotmailer.block.mapping'|trans, 'subblocks': [{ 'title': '', 'data': [ form_row(form.config_source), UI.scrollSubblock( '', [ dataFieldMappingUpdate.mapping_form( form.config, {'id': type ~ '-mapping-form'} ), dataFieldMappingUpdate.mapping_list( { 'id': type ~ '-mapping-list', 'rowId': type ~ '-mapping-row' } ), ], '', '', type ~ '-mappings' ), ] }] }] ) %} {% set dataBlocks = dataBlocks|merge(oro_form_additional_data(form, 'oro.dotmailer.block.additional'|trans)) %} {% set data = { 'formErrors': form_errors(form)? form_errors(form) : null, 'dataBlocks': dataBlocks, } %} {{ QD.query_designer_column_chain_template('column-chain-template') }} {{ dataFieldMappingUpdate.initJsWidgets(type, form, entities) }} {{ parent() }} {% endblock content_data %} {% macro mapping_form(form, attr, params) %} {% import '@OroUI/macros.html.twig' as UI %} {% set attr = attr|default({})|merge({ 'class': (attr.class|default('') ~ ' dotmailer-mapping-form clearfix')|trim }) %}
{{ 'oro.dotmailer.datafieldmappingconfig.entity_fields.label'|trans }} | {{ 'oro.dotmailer.datafieldmappingconfig.data_field.label'|trans }} | {{ 'oro.dotmailer.datafieldmappingconfig.is_two_way_sync.label'|trans }} | {{ 'oro.query_designer.datagrid.column.actions'|trans }} |
---|