mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +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:
parent
4c2ec6761a
commit
c3b25b6eeb
@ -103,4 +103,6 @@ Master branch
|
||||
- [CRUD] add step delete
|
||||
- [CRUD] improve index view in person CRUD
|
||||
- [CRUD] filter by basis on person by default in EntityPersonCRUDController
|
||||
- [CRUD] override relevant part of the main CRUD template
|
||||
- [CRUD] fix redirection on person view: add a `person_id` to every page redirected.
|
||||
|
||||
|
@ -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()
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user