{% extends app.request.xmlHttpRequest ? 'form.html.twig' : 'base.html.twig' %} {% import "customer/actions.html.twig" as actions %} {% block page_title %}{{ 'admin_customer.title'|trans }}{% endblock %} {% block page_actions %}{{ actions.customer(customer, 'edit') }}{% endblock %} {% block main %} {% set formEditTemplate = app.request.xmlHttpRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig' %} {% set formOptions = { 'title': (customer.id is null ? 'create'|trans : 'edit'|trans({}, 'actions')), 'form': form, 'back': path('admin_customer') } %} {% embed formEditTemplate with formOptions %} {% block form_body %}
{{ form_row(form.name) }}
{{ form_row(form.color) }}
{{ form_row(form.comment) }} {{ form_row(form.address) }}
{{ form_row(form.company) }}
{{ form_row(form.number) }}
{{ form_row(form.vatId) }}
{{ form_row(form.country) }}
{{ form_row(form.currency) }}
{{ form_row(form.timezone) }}
{{ form_row(form.contact) }}
{{ form_row(form.email) }}
{{ form_row(form.homepage) }}
{{ form_row(form.mobile) }}
{{ form_row(form.phone) }}
{{ form_row(form.fax) }}
{% if form.budget is defined %}
{{ form_row(form.budget) }}
{{ form_row(form.timeBudget) }}
{% endif %} {{ form_row(form.visible) }} {% if form.metaFields is defined and form.metaFields is not empty %} {% for meta in form.metaFields|sort((a, b) => a.vars.data.order <=> b.vars.data.order) %} {{ form_row(meta) }} {% endfor %} {% endif %} {{ form_widget(form) }} {% endblock %} {% endembed %} {% endblock %}