Files
danbooru/app/views/moderator/post/approvals/create.js.erb

16 lines
368 B
Plaintext

<% if @post.errors.any? %>
Danbooru.error("Error: " + <%= @post.errors.full_messages.join("; ").to_json.html_safe %>);
<% else %>
$("#c-posts #approve").hide();
$("#c-posts #disapprove").hide();
$("#c-posts #flag").show();
$("#pending-approval-notice").hide();
$("#c-post-moderation #post-<%= @post.id %>").hide();
Danbooru.notice("Post was approved");
<% end %>