mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
[CRUD] Forward query parameters when pushing button "save and new" in "create" page
This commit is contained in:
parent
a732393100
commit
567f3f7ec9
@ -143,4 +143,5 @@ Master Branch
|
||||
=============
|
||||
|
||||
- [Export list] improve alignment of last line
|
||||
- [CRUD] Forward query parameters when pushing button "save and new" in "create" page;
|
||||
|
||||
|
@ -994,12 +994,12 @@ class CRUDController extends AbstractController
|
||||
protected function onBeforeRedirectAfterSubmission(string $action, $entity, FormInterface $form, Request $request)
|
||||
{
|
||||
$next = $request->request->get("submit", "save-and-close");
|
||||
|
||||
|
||||
switch ($next) {
|
||||
case "save-and-close":
|
||||
return $this->redirectToRoute('chill_crud_'.$this->getCrudName().'_index');
|
||||
case "save-and-new":
|
||||
return $this->redirectToRoute('chill_crud_'.$this->getCrudName().'_new');
|
||||
return $this->redirectToRoute('chill_crud_'.$this->getCrudName().'_new', $request->query->all());
|
||||
default:
|
||||
return $this->redirectToRoute('chill_crud_'.$this->getCrudName().'_view', [
|
||||
'id' => $entity->getId()
|
||||
|
Loading…
x
Reference in New Issue
Block a user