mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
add form edit metadata in summary page
This commit is contained in:
@@ -51,10 +51,18 @@ class HouseholdController extends AbstractController
|
||||
// initialize members collection, which will avoid
|
||||
// some queries
|
||||
$household->getMembers()->initialize();
|
||||
|
||||
if ($request->query->has('edit')) {
|
||||
$form = $this->createMetadataForm($household);
|
||||
} else {
|
||||
$form = null;
|
||||
}
|
||||
|
||||
return $this->render('@ChillPerson/Household/summary.html.twig',
|
||||
[
|
||||
'household' => $household,
|
||||
'positions' => $positions
|
||||
'positions' => $positions,
|
||||
'form' => NULL !== $form ? $form->createView() : null,
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -149,7 +157,7 @@ class HouseholdController extends AbstractController
|
||||
|
||||
$this->addFlash('success', $this->translator->trans('household.data_saved'));
|
||||
|
||||
return $this->redirectToRoute('chill_person_household_members', [
|
||||
return $this->redirectToRoute('chill_person_household_summary', [
|
||||
'household_id' => $household->getId()
|
||||
]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user