{% extends 'OroUIBundle:actions:update.html.twig' %} {% oro_title_set({params : {"%entity.subject%": entity.subject, "%entityName%": 'orocrm.task.entity_label'|trans }}) %} {% set entityId = entity.id %} {% block navButtons %} {% set html = UI.saveAndCloseButton() %} {% if resource_granted('orocrm_task_update') %} {% set html = html ~ UI.saveAndStayButton() %} {% endif %} {{ UI.dropdownSaveButton({'html': html}) }} {{ UI.cancelButton(path('orocrm_task_index')) }} {% endblock navButtons %} {% block pageHeader %} {% if entityId %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('orocrm_task_index'), 'indexLabel': 'orocrm.task.entity_plural_label'|trans, 'entityTitle': entity.subject } %} {{ parent() }} {% else %} {% set title = 'oro.ui.create_entity'|trans({'%entityName%': 'orocrm.task.entity_label'|trans}) %} {% include 'OroUIBundle::page_title_block.html.twig' with { title: title } %} {% endif %} {% endblock pageHeader %} {% block content_data %} {% set id = 'task-form' %} {% set dataBlocks = [{ 'title': 'General Information'|trans, 'class': 'active', 'subblocks': [ { 'title': '', 'data': [ form_row(form.subject), form_row(form.description), form_row(form.dueDate), form_row(form.taskPriority), form.owner is defined ? form_row(form.owner) : '', form_row(form.reminders) ] } ] }] %} {% set additionalData = [] %} {% for child in form.children if child.vars.extra_field is defined and child.vars.extra_field %} {% set additionalData = additionalData|merge([form_row(child)]) %} {% endfor %} {% if additionalData is not empty %} {% set dataBlocks = dataBlocks|merge([{ 'title': 'Additional'|trans, 'subblocks': [{ 'title': '', 'useSpan': false, 'data' : additionalData }] }] ) %} {% endif %} {% set data = { 'formErrors': form_errors(form)? form_errors(form) : null, 'dataBlocks': dataBlocks, } %} {{ parent() }} {% endblock content_data %}