From a54cc70fd63ffa326db6b24e5a954ae7ed297629 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Fri, 7 Jan 2022 12:34:14 +0100 Subject: [PATCH] temporary disable previous commit --- .../AccompanyingCourseCommentController.php | 69 ++++++++++--------- .../confirm_delete_comment.html.twig | 4 ++ 2 files changed, 39 insertions(+), 34 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseCommentController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseCommentController.php index 55bb936b0..c0481c854 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseCommentController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseCommentController.php @@ -103,38 +103,39 @@ class AccompanyingCourseCommentController extends AbstractController return $form; } - ////////////// building - /** - * Delete an existing comment - * - * @Route( - * "/{_locale}/parcours/{accompanying_period_id}/comment/{comment_id}/delete", - * name="chill_person_accompanying_period_comment_delete" - * ) - * @ParamConverter("accompanyingCourse", options={"id": "accompanying_period_id"}) - * @ParamConverter("comment", options={"id": "comment_id"}) - */ - public function deleteAction(AccompanyingPeriod $accompanyingCourse, AccompanyingPeriod\Comment $comment, Request $request) - { - $form = $this->createDeleteForm($comment->getId(), $accompanyingCourse); - - return $this->render('@ChillPerson/AccompanyingCourse/confirm_delete_comment.html.twig', [ - 'comment' => $comment, - 'delete_form' => $form->createView(), - 'accompanyingCourse' => $accompanyingCourse, - ]); - } - - private function createDeleteForm(int $id, ?AccompanyingPeriod $accompanyingCourse): FormInterface - { - $form = $this->createForm($type); - - return $this->createFormBuilder() - ->setAction($this->generateUrl('chill_person_accompanying_period_comment_delete', $params)) - ->setMethod('DELETE') - ->add('submit', SubmitType::class, ['label' => 'Delete']) - ->getForm(); - } - - //// end +////////////// building +/// +// /** +// * Delete an existing comment +// * +// * @Route( +// * "/{_locale}/parcours/{accompanying_period_id}/comment/{comment_id}/delete", +// * name="chill_person_accompanying_period_comment_delete" +// * ) +// * @ParamConverter("accompanyingCourse", options={"id": "accompanying_period_id"}) +// * @ParamConverter("comment", options={"id": "comment_id"}) +// */ +// public function deleteAction(AccompanyingPeriod $accompanyingCourse, AccompanyingPeriod\Comment $comment, Request $request) +// { +// $form = $this->createDeleteForm($comment->getId(), $accompanyingCourse); +// +// return $this->render('@ChillPerson/AccompanyingCourse/confirm_delete_comment.html.twig', [ +// 'comment' => $comment, +// 'delete_form' => $form->createView(), +// 'accompanyingCourse' => $accompanyingCourse, +// ]); +// } +// +// private function createDeleteForm(int $id, ?AccompanyingPeriod $accompanyingCourse): FormInterface +// { +// $form = $this->createForm($type); +// +// return $this->createFormBuilder() +// ->setAction($this->generateUrl('chill_person_accompanying_period_comment_delete', $params)) +// ->setMethod('DELETE') +// ->add('submit', SubmitType::class, ['label' => 'Delete']) +// ->getForm(); +// } +// +//// end } diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/confirm_delete_comment.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/confirm_delete_comment.html.twig index fd5259c70..ecef5e271 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/confirm_delete_comment.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/confirm_delete_comment.html.twig @@ -1,3 +1,5 @@ +{# WIP + {% extends "@ChillPerson/Person/layout.html.twig" %} {% set person = activity.person %} @@ -14,3 +16,5 @@ 'form' : delete_form } ) }} {% endblock %} + +#}