stuff
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
var errors = <%= @unapproval.errors.full_messages.to_json.html_safe %>;
|
||||
var errors = <%= @post_flag.errors.full_messages.to_json.html_safe %>;
|
||||
if (errors.length > 0) {
|
||||
Danbooru.j_error(errors.join("; "));
|
||||
} else {
|
||||
Danbooru.j_alert("Flag", "Post flagged");
|
||||
$("a#approve").show();
|
||||
$("a#disapprove").show();
|
||||
$("a#flag").hide();
|
||||
}
|
||||
|
||||
@@ -20,6 +20,6 @@
|
||||
<p>Enter a reason:</p>
|
||||
|
||||
<%= simple_form_for(@post_flag, :remote => true, :format => :js) do |f| %>
|
||||
<%= hidden_field_tag "post_flag[post_id]", @post_flag.post_id %>
|
||||
<%= f.input :post_id, :as => :hidden %>
|
||||
<%= f.text_field :reason %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user