Fix delete request for all entities

This commit is contained in:
2024-07-17 13:05:14 +02:00
parent ead1abb825
commit 74be6460d4
11 changed files with 20 additions and 31 deletions

View File

@@ -84,7 +84,7 @@ class CalendarController extends AbstractController
$form = $this->createDeleteForm($entity);
if (Request::METHOD_DELETE === $request->getMethod()) {
if (Request::METHOD_POST === $request->getMethod()) {
$form->handleRequest($request);
if ($form->isValid()) {
@@ -512,7 +512,6 @@ class CalendarController extends AbstractController
{
return $this->createFormBuilder()
->setAction($this->generateUrl('chill_calendar_calendar_delete', ['id' => $calendar->getId()]))
->setMethod('DELETE')
->add('submit', SubmitType::class, ['label' => 'Delete'])
->getForm();
}