Symfony and Twig: How to display a confirmation dialog

dialog, symfony, twig

Solution

Just use `confirm` javascript function on your delete link

<a href="{{ path('delete_route', {csrf:...}) }}" onclick="return confirm('are u sure?')">delete</a>

Problem

I have a delete link in my twig template and I would like to know if there is a Symfony2 way of displaying the confirm dialog. I know this is possible with JQuery, but maybe symfony has his own "way of doing". Thank you.

Original source