fix the modify address

This commit is contained in:
soukainna 2023-05-09 12:13:14 +02:00
parent 83ae4665f0
commit eec5afdf39
2 changed files with 8 additions and 3 deletions

View File

@ -32,6 +32,7 @@ views:
update:
files:
- web/layouts/_partials/address_autocomplete.html
- web/layouts/agenda/_partials/address.html
- web/layouts/beneficiaries/update.html
members:
display:

View File

@ -162,9 +162,13 @@
</div>
<div class="mt-5 space-y-6 md:mt-0 md:col-span-2">
{{ $fieldName := "address" }}
{{ template "address_autocomplete" (dict "FieldName" $fieldName "Address" .ViewState.Data.address) }}
<!-- will dolater : tags, groups, ... -->
{{ $fieldName := "address" }}
{{if .ViewState.Data.address}}
{{$default := .ViewState.Data.address}}
{{ template "address" dict "FieldName" $fieldName "Default" $default}}
{{else}}
{{ template "address_autocomplete" dict "FieldName" $fieldName}}
{{end}}
</div>
</div>