temporary disable previous commit

This commit is contained in:
Mathieu Jaumotte 2022-01-07 12:34:14 +01:00
parent 68ea0a1086
commit a54cc70fd6
2 changed files with 39 additions and 34 deletions

View File

@ -103,38 +103,39 @@ class AccompanyingCourseCommentController extends AbstractController
return $form; return $form;
} }
////////////// building ////////////// building
/** ///
* Delete an existing comment // /**
* // * Delete an existing comment
* @Route( // *
* "/{_locale}/parcours/{accompanying_period_id}/comment/{comment_id}/delete", // * @Route(
* name="chill_person_accompanying_period_comment_delete" // * "/{_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"}) // * @ParamConverter("accompanyingCourse", options={"id": "accompanying_period_id"})
*/ // * @ParamConverter("comment", options={"id": "comment_id"})
public function deleteAction(AccompanyingPeriod $accompanyingCourse, AccompanyingPeriod\Comment $comment, Request $request) // */
{ // public function deleteAction(AccompanyingPeriod $accompanyingCourse, AccompanyingPeriod\Comment $comment, Request $request)
$form = $this->createDeleteForm($comment->getId(), $accompanyingCourse); // {
// $form = $this->createDeleteForm($comment->getId(), $accompanyingCourse);
return $this->render('@ChillPerson/AccompanyingCourse/confirm_delete_comment.html.twig', [ //
'comment' => $comment, // return $this->render('@ChillPerson/AccompanyingCourse/confirm_delete_comment.html.twig', [
'delete_form' => $form->createView(), // 'comment' => $comment,
'accompanyingCourse' => $accompanyingCourse, // 'delete_form' => $form->createView(),
]); // 'accompanyingCourse' => $accompanyingCourse,
} // ]);
// }
private function createDeleteForm(int $id, ?AccompanyingPeriod $accompanyingCourse): FormInterface //
{ // private function createDeleteForm(int $id, ?AccompanyingPeriod $accompanyingCourse): FormInterface
$form = $this->createForm($type); // {
// $form = $this->createForm($type);
return $this->createFormBuilder() //
->setAction($this->generateUrl('chill_person_accompanying_period_comment_delete', $params)) // return $this->createFormBuilder()
->setMethod('DELETE') // ->setAction($this->generateUrl('chill_person_accompanying_period_comment_delete', $params))
->add('submit', SubmitType::class, ['label' => 'Delete']) // ->setMethod('DELETE')
->getForm(); // ->add('submit', SubmitType::class, ['label' => 'Delete'])
} // ->getForm();
// }
//// end //
//// end
} }

View File

@ -1,3 +1,5 @@
{# WIP
{% extends "@ChillPerson/Person/layout.html.twig" %} {% extends "@ChillPerson/Person/layout.html.twig" %}
{% set person = activity.person %} {% set person = activity.person %}
@ -14,3 +16,5 @@
'form' : delete_form 'form' : delete_form
} ) }} } ) }}
{% endblock %} {% endblock %}
#}