{% extends '@OroUI/actions/update.html.twig' %} {% form_theme form with ['@OroForm/Form/fields.html.twig'] %} {% set fullname = form.vars.value|oro_format_name|default('N/A') %} {% oro_title_set({params : {"%username%": fullname, "%entityName%": 'oro.user.entity_label'|trans }}) %} {% set formAction = form.vars.value.id ? path('oro_user_update', { id: form.vars.value.id}) : path('oro_user_create') %} {% block navButtons %} {% import '@OroUI/macros.html.twig' as UI %} {% if form.vars.value.id and is_granted('DELETE', form.vars.value) and form.vars.value.id != app.user.id %} {{ UI.deleteButton({ 'dataUrl': path('oro_api_delete_user', {'id': form.vars.value.id}), 'dataRedirect': path('oro_user_index'), 'aCss': 'no-hash remove-button', 'id': 'btn-remove-user', 'dataId': form.vars.value.id, 'entity_label': 'oro.user.entity_label'|trans, 'disabled': not allow_delete }) }} {{ UI.buttonSeparator() }} {% endif %} {{ UI.cancelButton(path('oro_user_index')) }} {% set html = UI.saveAndCloseButton({ 'route': 'oro_user_view', 'params': {'id': '$id'} }) %} {% if is_granted('oro_user_create') %} {% set html = html ~ UI.saveAndNewButton({ 'route': 'oro_user_create' }) %} {% endif %} {% if form.vars.value.id or is_granted('oro_user_user_update') %} {% set html = html ~ UI.saveAndStayButton({ 'route': 'oro_user_update', 'params': {'id': '$id'} }) %} {% endif %} {{ UI.dropdownSaveButton({'html': html}) }} {{ parent() }} {% endblock navButtons %} {% block pageHeader %} {% if form.vars.value.id %} {% set breadcrumbs = { 'entity': form.vars.value, 'indexPath': path('oro_user_index'), 'indexLabel': 'oro.user.entity_plural_label'|trans, 'entityTitle': fullname, } %} {{ parent() }} {% else %} {% set title = 'oro.ui.create_entity'|trans({'%entityName%': 'oro.user.entity_label'|trans}) %} {% include '@OroUI/page_title_block.html.twig' with { title: title } %} {% endif %} {% endblock pageHeader %} {% block pageTitleIcon %}