From 40d644ea3f8a5b651c9f8b49545d5c0355c1fd7d Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Tue, 26 Mar 2019 11:39:06 +0100 Subject: [PATCH] Add a confirm before procedure deletion --- app/views/admin/procedures/_list.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/procedures/_list.html.haml b/app/views/admin/procedures/_list.html.haml index 8fcb04aee..39f9a4a4a 100644 --- a/app/views/admin/procedures/_list.html.haml +++ b/app/views/admin/procedures/_list.html.haml @@ -26,7 +26,7 @@ %td = link_to('Cloner', admin_procedure_clone_path(procedure.id), data: { method: :put }, class: 'btn-sm btn-primary clone-btn') - if !procedure.publiee_ou_archivee? - = link_to('X', url_for(controller: 'admin/procedures', action: :destroy, id: procedure.id), data: { method: :delete }, class: 'btn-sm btn-danger') + = link_to('X', url_for(controller: 'admin/procedures', action: :destroy, id: procedure.id), data: { method: :delete, confirm: "Confirmez-vous la suppression de la démarche ?" }, class: 'btn-sm btn-danger') = smart_listing.paginate = smart_listing.pagination_per_page_links