From 52a0c0e95bd81dc005fbd52553a690ea13a873f4 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Fri, 27 Aug 2021 09:30:15 +0200 Subject: [PATCH] create new person: add an action and put action buttons in a dropdown --- .../Controller/PersonController.php | 4 ++- .../Resources/views/Person/create.html.twig | 26 +++++++++++++++---- .../translations/messages.fr.yml | 3 ++- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonController.php b/src/Bundle/ChillPersonBundle/Controller/PersonController.php index c390565b5..759f892b2 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonController.php @@ -244,7 +244,9 @@ final class PersonController extends AbstractController 'label' => 'Add the person' ])->add('createPeriod', SubmitType::class, [ 'label' => 'Add the person and create an accompanying period' - ]); + ])->add('createHousehold', SubmitType::class, [ + 'label' => 'Add the person and create an household' + ]); // TODO createHousehold form action $form->handleRequest($request); diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig index 9718308ed..eddcfd676 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig @@ -76,12 +76,28 @@ {{ form_row(form.gender, { 'label' : 'Gender'|trans }) }} +
+ {# TODO remove this field (vendee) #} + {{ form_row(form.center, { 'label' : 'Center'|trans }) }} +
+ diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 54c1f3818..852f3256b 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -119,7 +119,8 @@ address_country_code: Code pays 'Alreay existing person': 'Dossiers déjà encodés' 'Add the person': 'Ajouter la personne' -'Add the person and create an accompanying period': "Ajouter la personne et créer une période d'accompagnement" +'Add the person and create an accompanying period': "Créer la personne ET créer une période d'accompagnement" +'Add the person and create an household': "Créer la personne ET créer un ménage" Show person: Voir le dossier de la personne 'Confirm the creation': 'Confirmer la création' 'You will create this person': 'Vous allez créer le dossier suivant'