Fix #3905: Unable to hide Mod Queue posts that were hidden in a separate tab.
Don't show "You have already hidden this post" and "Post is already active" errors when disapproving a post. Just hide the post anyway regardless of whether we literally created a post disapproval record.
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
<% if @post_disapproval.errors.any? %>
|
||||
Danbooru.error("Error: " + <%= @post_disapproval.errors.full_messages.join("; ").to_json.html_safe %>);
|
||||
<% else %>
|
||||
if ($("#c-posts #a-show").length) {
|
||||
location.reload();
|
||||
} else if ($("#c-modqueue").length) {
|
||||
$("#c-modqueue #post-<%= @post_disapproval.post.id %>").hide();
|
||||
Danbooru.notice("Post was hidden");
|
||||
}
|
||||
<% end %>
|
||||
if ($("#c-posts #a-show").length) {
|
||||
location.reload();
|
||||
} else if ($("#c-modqueue").length) {
|
||||
$("#c-modqueue #post-<%= @post_disapproval.post.id %>").hide();
|
||||
Danbooru.notice("Post was hidden");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user