From eec5afdf39357d48968657129d3e6afe480ac50b Mon Sep 17 00:00:00 2001 From: soukainna Date: Tue, 9 May 2023 12:13:14 +0200 Subject: [PATCH] fix the modify address --- config.yaml | 1 + web/layouts/beneficiaries/update.html | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/config.yaml b/config.yaml index a144890..cddab5e 100644 --- a/config.yaml +++ b/config.yaml @@ -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: diff --git a/web/layouts/beneficiaries/update.html b/web/layouts/beneficiaries/update.html index da1b4c9..eacda1c 100644 --- a/web/layouts/beneficiaries/update.html +++ b/web/layouts/beneficiaries/update.html @@ -162,9 +162,13 @@
- {{ $fieldName := "address" }} - {{ template "address_autocomplete" (dict "FieldName" $fieldName "Address" .ViewState.Data.address) }} - + {{ $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}}