mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
improves create a person with address
* validation: must have an address when 'create a form' is checked; * minor improvements
This commit is contained in:
@@ -252,7 +252,7 @@ final class PersonController extends AbstractController
|
||||
$this->lastPostDataReset();
|
||||
|
||||
$address = $form->get('address')->getData();
|
||||
$addressForm = $form->get('addressForm')->getData();
|
||||
$addressForm = (bool) $form->get('addressForm')->getData();
|
||||
|
||||
if (null !== $address && $addressForm) {
|
||||
$household = new Household();
|
||||
@@ -271,7 +271,7 @@ final class PersonController extends AbstractController
|
||||
if ($form->get('createHousehold')->isClicked()) {
|
||||
return $this->redirectToRoute('chill_person_household_members_editor', [
|
||||
'persons' => [$person->getId()],
|
||||
'household' => $household->getId()
|
||||
'household' => $household->getId(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user