Allow logged users to comment posts. Edition is not allowed via the API since it doesn't support auth yet. Symfony UX is used with Turbo to avoid full pages reload, without JavaScript™. Co-authored-by: clfreville2 <clement.freville2@etu.uca.fr> Reviewed-on: https://codefirst.iut.uca.fr/git/clement.freville2/herbarium/pulls/10
5 lines
311 B
Twig
5 lines
311 B
Twig
<form method="post" action="{{ path('app_post_comment_delete', {'id': comment.id}) }}" onsubmit="return confirm('Are you sure you want to delete this comment?');">
|
|
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ comment.id) }}">
|
|
<button class="btn btn-danger">Delete</button>
|
|
</form>
|