{% extends '@OroUI/actions/update.html.twig' %} {% oro_title_set({params : { '%entity.name%': entity.name, '%entityName%': 'oro.dotmailer.datafield.entity_label'|trans } }) %} {% set entityId = entity.id %} {% set formAction = path('oro_dotmailer_datafield_create') %} {% block bodyClass %}dotmailer-page{% endblock %} {% block navButtons %} {% import '@OroUI/macros.html.twig' as UI %} {% set html = UI.saveAndCloseButton({ 'route': 'oro_dotmailer_datafield_view', 'params': {'id': '$id'} }) %} {% if is_granted('oro_dotmailer_datafield_create') %} {% set html = html ~ UI.saveAndNewButton({ 'route': 'oro_dotmailer_datafield_create' }) %} {% endif %} {{ UI.dropdownSaveButton({'html': html}) }} {{ UI.cancelButton(path('oro_dotmailer_datafield_index')) }} {% endblock navButtons %} {% block pageHeader %} {% if entityId %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('oro_dotmailer_datafield_index'), 'indexLabel': 'oro.dotmailer.datafield.entity_plural_label'|trans, 'entityTitle': entity.name } %} {{ parent() }} {% else %} {% set title = 'oro.ui.create_entity'|trans({'%entityName%': 'oro.dotmailer.datafield.entity_label'|trans}) %} {% include '@OroUI/page_title_block.html.twig' with { title: title } %} {% endif %} {% endblock pageHeader %} {% block content_data %} {% set id = 'dotmailer-datafield-form' %} {% set dataBlocks = [{ 'title': 'oro.dotmailer.block.general'|trans, 'subblocks': [{ 'title': '', 'data': [ form_row(form.channel), form_row(form.name), form_row(form.type), form_row(form.visibility), form_row(form.defaultValue) ] }] }] %} {% set additionalData = [ form_row(form.notes) ] %} {% set dataBlocks = dataBlocks|merge(oro_form_additional_data(form, 'oro.dotmailer.block.additional'|trans, additionalData)) %} {% set data = { 'formErrors': form_errors(form)? form_errors(form) : null, 'dataBlocks': dataBlocks, } %} {# update default value input type based on type field #} {% set fieldsToSendOnTypeChange = [ form.type.vars.full_name, form.name.vars.full_name, form.visibility.vars.full_name, form.notes.vars.full_name, form._token.vars.full_name ] %} {{ parent() }} {% endblock content_data %}