From adbd737a0c55860f77ea576a1febdc4cb5731a82 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 5 Apr 2018 21:16:28 +0100 Subject: [PATCH] Ask for confirmation before deleting a trace Fixes #1812 --- app/views/trace/view.html.erb | 2 +- config/locales/en.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/trace/view.html.erb b/app/views/trace/view.html.erb index df45f2f2d..8fc17a1f2 100644 --- a/app/views/trace/view.html.erb +++ b/app/views/trace/view.html.erb @@ -59,6 +59,6 @@ <%= if_user(@trace.user) do %> <%= button_to t('trace.view.edit_track'), trace_edit_path(@trace) %> <% end %> - <%= button_to t('trace.view.delete_track'), :controller => 'trace', :action => 'delete', :id => @trace.id %> + <%= button_to t('trace.view.delete_track'), { :controller => 'trace', :action => 'delete', :id => @trace.id }, :data => { :confirm => t('trace.view.confirm_delete') } %> <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index af33f34f8..7df06b277 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1636,6 +1636,7 @@ en: delete_track: "Delete this trace" trace_not_found: "Trace not found!" visibility: "Visibility:" + confirm_delete: "Delete this trace?" trace_paging_nav: showing_page: "Page %{page}" older: "Older Traces" -- 2.39.5