{% extends '@OroUI/actions/update.html.twig' %} {% oro_title_set({params : {"%entity.subject%": entity.subject, "%entityName%": 'oro.case.caseentity.entity_label'|trans }}) %} {% set entityId = entity.id %} {% set formAction = entityId ? path('oro_case_update', { 'id': entityId}) : path('oro_case_create') %} {% block navButtons %} {% import '@OroUI/macros.html.twig' as UI %} {% set html = UI.saveAndCloseButton({ 'route': 'oro_case_view', 'params': {'id': '$id'} }) %} {% if is_granted('oro_case_create') %} {% set html = html ~ UI.saveAndNewButton({ 'route': 'oro_case_create' }) %} {% endif %} {% if is_granted('oro_case_update') %} {% set html = html ~ UI.saveAndStayButton({ 'route': 'oro_case_update', 'params': {'id': '$id'} }) %} {% endif %} {{ UI.dropdownSaveButton({'html': html}) }} {{ UI.cancelButton(path('oro_case_index')) }} {% endblock navButtons %} {% block pageHeader %} {% if entityId %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('oro_case_index'), 'indexLabel': 'oro.case.caseentity.entity_plural_label'|trans, 'entityTitle': entity.subject } %} {{ parent() }} {% else %} {% set title = 'oro.ui.create_entity'|trans({'%entityName%': 'oro.case.caseentity.entity_label'|trans}) %} {% include '@OroUI/page_title_block.html.twig' with { title: title } %} {% endif %} {% endblock pageHeader %} {% block content_data %} {% set id = 'case-form' %} {% set dataBlocks = [{ 'title': 'oro.case.block.general'|trans, 'subblocks': [ { 'title': '', 'data': [ form_row(form.subject), form_row(form.description), form_row(form.resolution), form.owner is defined ? form_row(form.owner) : '', form_row(form.assignedTo), form_row(form.source), form_row(form.status), form_row(form.priority), form_row(form.relatedContact), form_row(form.relatedAccount) ] } ] }] %} {% set dataBlocks = dataBlocks|merge(oro_form_additional_data(form, 'oro.case.block.additional'|trans)) %} {% set data = { 'formErrors': form_errors(form)? form_errors(form) : null, 'dataBlocks': dataBlocks, } %} {{ parent() }} {% endblock content_data %}