mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fixed: [calendar doc] Add a return path to the calendar edit's form when the document has been generated
Fix https://gitlab.com/Chill-Projet/chill-bundles/-/issues/81
This commit is contained in:
parent
3df8ee6dc4
commit
1c19d01b60
@ -207,6 +207,7 @@ class CalendarController extends AbstractController
|
|||||||
'entityClassName' => Calendar::class,
|
'entityClassName' => Calendar::class,
|
||||||
'entityId' => $entity->getId(),
|
'entityId' => $entity->getId(),
|
||||||
'template' => $template->getId(),
|
'template' => $template->getId(),
|
||||||
|
'returnPath' => $request->getRequestUri(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -377,7 +378,9 @@ class CalendarController extends AbstractController
|
|||||||
$this->addFlash('success', $this->translator->trans('Success : calendar item created!'));
|
$this->addFlash('success', $this->translator->trans('Success : calendar item created!'));
|
||||||
|
|
||||||
if ($form->get('save_and_upload_doc')->isClicked()) {
|
if ($form->get('save_and_upload_doc')->isClicked()) {
|
||||||
return $this->redirectToRoute('chill_calendar_calendardoc_new', ['id' => $entity->getId()]);
|
return $this->redirectToRoute('chill_calendar_calendardoc_new', [
|
||||||
|
'id' => $entity->getId()
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($templates as $template) {
|
foreach ($templates as $template) {
|
||||||
@ -386,6 +389,7 @@ class CalendarController extends AbstractController
|
|||||||
'entityClassName' => Calendar::class,
|
'entityClassName' => Calendar::class,
|
||||||
'entityId' => $entity->getId(),
|
'entityId' => $entity->getId(),
|
||||||
'template' => $template->getId(),
|
'template' => $template->getId(),
|
||||||
|
'returnPath' => $this->generateUrl('chill_calendar_calendar_edit', ['id' => $entity->getId()]),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
<ul class="record_actions sticky-form-buttons">
|
<ul class="record_actions sticky-form-buttons">
|
||||||
<li class="cancel">
|
<li class="cancel">
|
||||||
<a class="btn btn-cancel" href="{{ chill_return_path_or('chill_calendar_calendar_list_by_accompanying_period', {'id': accompanyingCourse.id }) }}">{{ 'Cancel'|trans|chill_return_path_label }}</a>
|
<a class="btn btn-cancel" href="{{ chill_return_path_or('chill_calendar_calendar_edit', {'id': calendar_doc.calendar.id }) }}">{{ 'Cancel'|trans|chill_return_path_label }}</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user