wip: group inquiries and booking
This commit is contained in:
1 parent
597b169b17
commit
732a0f1d19
33 files changed
+644
-95
No files matched your search
@@ -28,6 +28,10 @@ class DeleteController extends AbstractController
|
||||
public function index(BookingEditDraft $draft, Request $request): Response
|
||||
{
|
||||
if (true === $request->isMethod(Request::METHOD_POST)) {
|
||||
if (!$this->isCsrfTokenValid('delete_booking_edit_draft_'.$draft->getId(), $request->request->getString('_token'))) {
|
||||
throw $this->createAccessDeniedException('Invalid CSRF token.');
|
||||
}
|
||||
|
||||
$this->entityManager->remove($draft);
|
||||
$this->entityManager->flush();
|
||||
|
||||
@@ -43,6 +47,7 @@ class DeleteController extends AbstractController
|
||||
|
||||
return $this->render('admin/booking_edit_draft/modal_delete.html.twig', [
|
||||
'draft' => $draft,
|
||||
'csrf_token_id' => 'delete_booking_edit_draft_'.$draft->getId(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user