mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-01 04:23:49 +00:00
fix redirection on person view: add a person_id
to every page redirected.
After a form was submitted, the CRUD controller redirect to page without a person_id. Now, the EntityPersonCRUDController redirects to a page **with** a person_id.
This commit is contained in:
@@ -117,15 +117,21 @@ class EntityPersonCRUDController extends CRUDController
|
||||
switch ($next) {
|
||||
case "save-and-close":
|
||||
return $this->redirectToRoute('chill_crud_'.$this->getCrudName().'_index', [
|
||||
'person_id' => $entity->getPerson()->getId()
|
||||
'person_id' => $this->getPerson($request)->getId()
|
||||
]);
|
||||
case "save-and-new":
|
||||
return $this->redirectToRoute('chill_crud_'.$this->getCrudName().'_new', [
|
||||
'person_id' => $entity->getPerson()->getId()
|
||||
'person_id' => $this->getPerson($request)->getId()
|
||||
]);
|
||||
case "new":
|
||||
return $this->redirectToRoute('chill_crud_'.$this->getCrudName().'_view', [
|
||||
'id' => $entity->getId(),
|
||||
'person_id' => $this->getPerson($request)->getId()
|
||||
]);
|
||||
default:
|
||||
return $this->redirectToRoute('chill_crud_'.$this->getCrudName().'_view', [
|
||||
'id' => $entity->getId()
|
||||
'id' => $entity->getId(),
|
||||
'person_id' => $this->getPerson($request)->getId()
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user