mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
commments: add basic form in template
This commit is contained in:
parent
8b2a8544b8
commit
530267a9b0
@ -227,22 +227,24 @@ class AccompanyingCourseController extends Controller
|
|||||||
public function commentAction(AccompanyingPeriod $accompanyingCourse, Request $request): Response
|
public function commentAction(AccompanyingPeriod $accompanyingCourse, Request $request): Response
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
$comment = new AccompanyingPeriod\Comment();
|
||||||
$form = $this->createForm(AccompanyingCourseCommentType::class, $comment, []);
|
|
||||||
|
|
||||||
|
$form = $this->createForm(AccompanyingCourseCommentType::class, $comment, []);
|
||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
if ($form->isSubmitted() && $form->isValid()) {
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
$em->persist($comment);
|
$em->persist($comment);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
return $this->redirectToRoute($route);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
return $this->render('@ChillPerson/AccompanyingCourse/comment_list.html.twig', [
|
return $this->render('@ChillPerson/AccompanyingCourse/comment_list.html.twig', [
|
||||||
'accompanyingCourse' => $accompanyingCourse,
|
'accompanyingCourse' => $accompanyingCourse,
|
||||||
// 'form' => $form->createView()
|
'form' => $form->createView()
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,6 +29,25 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="accompanyingcourse-comment-list">
|
<div class="accompanyingcourse-comment-list">
|
||||||
<h1>{{ block('title') }}</h1>
|
<h1>{{ block('title') }}</h1>
|
||||||
|
|
||||||
|
<div class="form my-5">
|
||||||
|
{{ form_start(form) }}
|
||||||
|
{{ form_errors(form) }}
|
||||||
|
|
||||||
|
{{ form_widget(form.content) }}
|
||||||
|
|
||||||
|
<ul class="record_actions">
|
||||||
|
<li>
|
||||||
|
<button class="btn btn-create" type="submit">{{ 'Post a new comment'|trans }}</button>
|
||||||
|
{#
|
||||||
|
<button class="btn btn-update" type="submit">{{ 'Edit a comment'|trans }}</button>
|
||||||
|
#}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{{ form_end(form) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="flex-table">
|
<div class="flex-table">
|
||||||
|
|
||||||
{% if accompanyingCourse.pinnedComment %}
|
{% if accompanyingCourse.pinnedComment %}
|
||||||
|
@ -407,9 +407,13 @@ Choose a person to locate by: Localiser auprès d'un usager concerné
|
|||||||
Associate at least one member with an household, and set an address to this household: Associez au moins un membre du parcours à un ménage, et indiquez une adresse à ce ménage.
|
Associate at least one member with an household, and set an address to this household: Associez au moins un membre du parcours à un ménage, et indiquez une adresse à ce ménage.
|
||||||
Locate by: Localiser auprès de
|
Locate by: Localiser auprès de
|
||||||
fix it: Compléter
|
fix it: Compléter
|
||||||
|
|
||||||
|
# Accompanying Course comments
|
||||||
Accompanying Course Comment: Commentaire
|
Accompanying Course Comment: Commentaire
|
||||||
Accompanying Course Comment list: Commentaires du parcours
|
Accompanying Course Comment list: Commentaires du parcours
|
||||||
pinned: épinglé
|
pinned: épinglé
|
||||||
|
Post a new comment: Poster un nouveau commentaire
|
||||||
|
Edit a comment: Modifier le commentaire
|
||||||
|
|
||||||
# Household
|
# Household
|
||||||
Household: Ménage
|
Household: Ménage
|
||||||
|
Loading…
x
Reference in New Issue
Block a user