posts: remove ban confirmation page.

Use a dialog instead of a separate page to confirm bans.
This commit is contained in:
evazion
2020-02-26 17:23:56 -06:00
parent bf281df023
commit e29e9eda49
3 changed files with 9 additions and 30 deletions

View File

@@ -1,12 +0,0 @@
<h1>Ban Post</h1>
<div>
<%= PostPresenter.preview(@post, show_deleted: true) %>
</div>
<%= form_tag(ban_moderator_post_post_path(@post), :style => "clear: both;", :class => "simple_form") do %>
<p>Banning a post will hide it from anyone without a gold level account or higher. You should only ban a post if an artist requested it.</p>
<%= submit_tag "Ban" %>
<%= submit_tag "Cancel" %>
<% end %>

View File

@@ -58,7 +58,7 @@
<% if post.is_banned? %>
<li id="post-option-unban"><%= link_to "Unban", unban_moderator_post_post_path(post), method: :post, "data-confirm": "Are you sure you want to unban this post?" %></li>
<% else %>
<li id="post-option-ban"><%= link_to "Ban", confirm_ban_moderator_post_post_path(post) %></li>
<li id="post-option-ban"><%= link_to "Ban", ban_moderator_post_post_path(post), method: :post, "data-confirm": "Are you sure you want to ban this post?" %></li>
<% end %>
<% if CurrentUser.is_admin? %>