diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php index dccf780d8..4495948fe 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php @@ -227,22 +227,24 @@ class AccompanyingCourseController extends Controller public function commentAction(AccompanyingPeriod $accompanyingCourse, Request $request): Response { -/* - $form = $this->createForm(AccompanyingCourseCommentType::class, $comment, []); + $comment = new AccompanyingPeriod\Comment(); + $form = $this->createForm(AccompanyingCourseCommentType::class, $comment, []); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrine()->getManager(); + $em->persist($comment); $em->flush(); + return $this->redirectToRoute($route); } -*/ + return $this->render('@ChillPerson/AccompanyingCourse/comment_list.html.twig', [ 'accompanyingCourse' => $accompanyingCourse, -// 'form' => $form->createView() + 'form' => $form->createView() ]); } diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/comment_list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/comment_list.html.twig index 6f900dc05..514ca388d 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/comment_list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/comment_list.html.twig @@ -29,6 +29,25 @@ {% block content %}
{{ block('title') }}
+ ++-
+
+ {#
+
+ #}
+
+
+ + {{ form_end(form) }} +