From 5f6506cbb4bea803c9ba07ecc1c794e661abd38d Mon Sep 17 00:00:00 2001 From: evazion Date: Thu, 6 Apr 2017 22:31:45 -0500 Subject: [PATCH] /posts/1234: add confirm dialog to sidebar approve/undelete links. --- app/views/posts/partials/show/_options.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/posts/partials/show/_options.html.erb b/app/views/posts/partials/show/_options.html.erb index 003346fd9..8776640a9 100644 --- a/app/views/posts/partials/show/_options.html.erb +++ b/app/views/posts/partials/show/_options.html.erb @@ -31,7 +31,7 @@ <% if CurrentUser.can_approve_posts? %> <% if post.is_deleted? %> -
  • <%= link_to "Undelete", undelete_moderator_post_post_path(:post_id => post.id), :remote => true, :method => :post, :id => "undelete" %>
  • +
  • <%= link_to "Undelete", undelete_moderator_post_post_path(:post_id => post.id), :remote => true, :method => :post, :id => "undelete", :data => { :confirm => "Are you sure you want to undelete this post?" } %>
  • <% if post.fav_count > 0 && post.parent_id %>
  • <%= link_to "Move favorites", confirm_move_favorites_moderator_post_post_path(:post_id => post.id) %>
  • <% end %> @@ -40,7 +40,7 @@ <% end %> <% if post.is_flagged? || post.is_pending? %> -
  • <%= link_to "Approve", moderator_post_approval_path(:post_id => post.id), :remote => true, :method => :post, :id => "approve" %>
  • +
  • <%= link_to "Approve", moderator_post_approval_path(:post_id => post.id), :remote => true, :method => :post, :id => "approve", :data => { :confirm => "Are you sure you want to approve this post?" } %>
  • <% else %>
  • <%= link_to "Hide from queue", moderator_post_disapproval_path(:post_id => post.id), :remote => true, :method => :post, :id => "disapprove" %>
  • <% end %>