From 809fda470bb66dde16e1e53cef07a0a3a54e2282 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 17 Dec 2024 09:35:52 +0100 Subject: [PATCH] Fix form to submit cancel reason --- .../Controller/CalendarController.php | 1 + .../views/Calendar/cancelCalendarByPerson.html.twig | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php index d036b6b1e..65037c005 100644 --- a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php +++ b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php @@ -124,6 +124,7 @@ class CalendarController extends AbstractController [$person, $accompanyingPeriod] = [$calendar->getPerson(), $calendar->getAccompanyingPeriod()]; $form = $this->createForm(CancelType::class, $calendar); + $form->add('submit', SubmitType::class); if ($accompanyingPeriod instanceof AccompanyingPeriod) { $view = '@ChillCalendar/Calendar/cancelCalendarByAccompanyingCourse.html.twig'; diff --git a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/cancelCalendarByPerson.html.twig b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/cancelCalendarByPerson.html.twig index 867a5b548..d6f71cc13 100644 --- a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/cancelCalendarByPerson.html.twig +++ b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/cancelCalendarByPerson.html.twig @@ -6,17 +6,24 @@ {% block content %} + {{ form_start(form) }} + {{ form_row(form.cancelReason) }} + {{ form_end(form) }} + {% endblock %}