mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
commments: add basic form in template
This commit is contained in:
@@ -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()
|
||||
]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user