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;
}
////////////// 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
}

View File

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