88 lines
2.9 KiB
Twig

{% extends "@ChillMain/layout.html.twig" %}
{% block title 'Create third party'|trans %}
{% block content %}
<div class="thirdparty-new my-5">
<div class="row justify-content-center">
<div class="col-md-10 col-xxl">
<h1>{{ 'Create third party'|trans }}</h1>
{{ form_start(form) }}
{% if form.civility is defined %}
{{ form_row(form.civility) }}
{% endif %}
{{ form_row(form.name) }}
{% if form.nameCompany is defined %}
{{ form_row(form.nameCompany) }}
{{ form_row(form.acronym) }}
{% endif %}
{% if form.profession is defined %}
{{ form_row(form.profession) }}
{% endif %}
{{ form_row(form.type) }}
{{ form_row(form.categories) }}
{{ form_row(form.telephone) }}
{{ form_row(form.email) }}
<div class="mb-3 row">
{{ form_label(form.address) }}
{{ form_widget(form.address) }}
<div class="col-sm-8">
{% if thirdParty.address %}
{# include vue_address component #}
{% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
targetEntity: { name: 'thirdparty', id: thirdParty.id },
mode: 'edit',
addressId: thirdParty.address.id,
buttonSize: 'btn-sm',
} %}
{#
backUrl: path('chill_3party_3party_new'),
#}
{% else %}
{# include vue_address component #}
{% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
targetEntity: { name: 'thirdparty', id: thirdParty.id },
mode: 'new',
buttonSize: 'btn-sm',
buttonText: 'Create a new address',
modalTitle: 'Create a new address',
} %}
{% endif %}
</div>
</div>
{{ form_row(form.comment) }}
{{ form_row(form.centers) }}
{{ form_row(form.active) }}
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a href="{{ chill_return_path_or('chill_3party_3party_index') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
</li>
<li>
{{ form_widget(form.submit, {'label': 'Create', 'attr': {'class': 'btn btn-new' }}) }}
</li>
</ul>
{{ form_end(form) }}
</div>
</div>
</div>
{% endblock %}