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? %>
|
if ($("#c-posts #a-show").length) {
|
||||||
Danbooru.error("Error: " + <%= @post_disapproval.errors.full_messages.join("; ").to_json.html_safe %>);
|
location.reload();
|
||||||
<% else %>
|
} else if ($("#c-modqueue").length) {
|
||||||
if ($("#c-posts #a-show").length) {
|
$("#c-modqueue #post-<%= @post_disapproval.post.id %>").hide();
|
||||||
location.reload();
|
Danbooru.notice("Post was hidden");
|
||||||
} else if ($("#c-modqueue").length) {
|
}
|
||||||
$("#c-modqueue #post-<%= @post_disapproval.post.id %>").hide();
|
|
||||||
Danbooru.notice("Post was hidden");
|
|
||||||
}
|
|
||||||
<% end %>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user