From f0a75653028c95541dbbf40e7f46dea8cfcd50b6 Mon Sep 17 00:00:00 2001 From: juminet Date: Wed, 19 Jan 2022 11:22:33 +0000 Subject: [PATCH] [location] fix address saving in admin form --- CHANGELOG.md | 11 ++++++++--- src/Bundle/ChillMainBundle/Form/LocationFormType.php | 1 - .../Resources/views/Location/index.html.twig | 2 +- .../Resources/views/ThirdParty/view.html.twig | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc67899f5..e65918d5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,15 @@ and this project adheres to ## Unreleased + +* [thirdparty] fix bug in 3rd party view: types was replaced by thirdPartyTypes +* [main] location form type: fix unmapped address field (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/246) * [activity] fix wrong import of js assets for adding and viewing documents in activity (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/83 & https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/176) +* [person]: space added between deathdate and age in twig renderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/380) + +## Test releases + +### test release 2022-01-10 * [main] Add editableByUser field to locationType entity, adapt the admin template and add this condition in the location-type endpoint (see https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/297) * [main] Add mainLocation field to User entity and add it in user form type @@ -21,9 +29,6 @@ and this project adheres to * [accompanying period work] remove the possibility to generate document from an accompanying period work * vuejs: add validation on required fields for AddPerson, Address and Location components * vuejs: treat 422 validation errors in locations and AddPerson components -* [person]: space added between deathdate and age in twig renderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/380) - -## Test releases ### test release 2022-01-12 diff --git a/src/Bundle/ChillMainBundle/Form/LocationFormType.php b/src/Bundle/ChillMainBundle/Form/LocationFormType.php index ecb4a76ea..713705de3 100644 --- a/src/Bundle/ChillMainBundle/Form/LocationFormType.php +++ b/src/Bundle/ChillMainBundle/Form/LocationFormType.php @@ -54,7 +54,6 @@ final class LocationFormType extends AbstractType 'label' => 'Address', 'use_valid_from' => false, 'use_valid_to' => false, - 'mapped' => false, ]) ->add( 'active', diff --git a/src/Bundle/ChillMainBundle/Resources/views/Location/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Location/index.html.twig index cc35be33a..bc39a9275 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Location/index.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Location/index.html.twig @@ -23,7 +23,7 @@ {{ entity.email }} {% if entity.address is not null %} - {{ entity.address.street}}, {{ entity.address.streetnumber }} + {{ entity.address| chill_entity_render_box }} {% endif %} diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig index 06c5e1391..8d40a8a34 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig @@ -50,7 +50,7 @@
{{ 'thirdparty.Categories'|trans }}
{% set types = [] %} - {% for t in thirdParty.types %} + {% for t in thirdParty.thirdPartyTypes %} {% set types = types|merge( [ ('chill_3party.key_label.'~t)|trans ] ) %} {% endfor %} {% for c in thirdParty.categories %}