tp form: call vue_address to manage address, wip

show some limits with AddAddress:
* bug with option buttonText overriding default
* need to improve step1
This commit is contained in:
2021-09-15 12:57:37 +02:00
parent 92fae5cba2
commit e94790b8ab
4 changed files with 134 additions and 2 deletions

View File

@@ -31,7 +31,36 @@
{{ form_row(form.telephone) }}
{{ form_row(form.email) }}
{{ form_row(form.address) }}
<div class="mb-3 row">
{{ form_label(form.address) }}
{{ form_widget(form.address) }}
<div class="col-sm-8">
new tp =>
{% if thirdParty.address %}
edit address
{# include vue_address component #}
{% include '@ChillThirdParty/Address/_insert_vue_address.html.twig' with {
mode: 'edit',
address_id: thirdParty.address.id,
buttonSize: 'btn-sm',
binModalStep1: false,
backUrl: path('chill_3party_3party_new')
} %}
{% else %}
create address
{# include vue_address component #}
{% include '@ChillThirdParty/Address/_insert_vue_address.html.twig' with {
mode: 'create',
buttonSize: 'btn-sm',
buttonText: 'Create a new address',
modalTitle: 'Create a new address',
binModalStep1: false,
backUrl: path('chill_3party_3party_new')
} %}
{% endif %}
</div>
</div>
{{ form_row(form.comment) }}
{{ form_row(form.centers) }}

View File

@@ -48,7 +48,32 @@
{{ form_row(form.telephone) }}
{{ form_row(form.email) }}
{{ form_row(form.address) }}
<div class="mb-3 row">
{{ form_label(form.address) }}
{{ form_widget(form.address) }}
<div class="col-sm-8">
update tp =>
{% if thirdParty.address %}
edit address
{# include vue_address component #}
{% include '@ChillThirdParty/Address/_insert_vue_address.html.twig' with {
mode: 'edit',
address_id: thirdParty.address.id,
buttonSize: 'btn-sm',
binModalStep1: false
} %}
{% else %}
create address
{# include vue_address component #}
{% include '@ChillThirdParty/Address/_insert_vue_address.html.twig' with {
mode: 'create',
buttonSize: 'btn-sm',
binModalStep1: false
} %}
{% endif %}
</div>
</div>
{{ form_row(form.comment) }}
{{ form_row(form.centers) }}