mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-01 12:33:49 +00:00
Fix delete request for all entities
This commit is contained in:
@@ -259,10 +259,10 @@ final class ParticipationController extends AbstractController
|
||||
|
||||
$form = $this->createDeleteForm($participation_id);
|
||||
|
||||
if (Request::METHOD_DELETE === $request->getMethod()) {
|
||||
if (Request::METHOD_POST === $request->getMethod()) {
|
||||
$form->handleRequest($request);
|
||||
|
||||
if ($form->isValid()) {
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$em->remove($participation);
|
||||
$em->flush();
|
||||
|
||||
@@ -753,7 +753,6 @@ final class ParticipationController extends AbstractController
|
||||
->setAction($this->generateUrl('chill_event_participation_delete', [
|
||||
'participation_id' => $participation_id,
|
||||
]))
|
||||
->setMethod('DELETE')
|
||||
->add('submit', SubmitType::class, ['label' => 'Delete'])
|
||||
->getForm();
|
||||
}
|
||||
|
Reference in New Issue
Block a user