Files
danbooru/app/views/post_disapprovals/_detailed_rejection_dialog.html.erb
2022-04-11 21:05:44 +02:00

17 lines
923 B
Plaintext

<div id="detailed-rejection-dialog" title="Detailed Rejection" style="display: none;">
<p>You can supply a short message to the uploader explaining why you rejected this upload.</p>
<% if @previous_disapproval %>
<%= edit_form_for(@previous_disapproval, remote: true, html: { id: "detailed-rejection-form" }) do |f| %>
<%= f.input :reason, collection: PostDisapproval::REASONS.map { |x| [x.humanize, x] }, :selected => @previous_disapproval.reason %>
<%= f.input :message, as: :string, :input_html => {:value => @previous_disapproval.message } %>
<% end %>
<% else %>
<%= edit_form_for(PostDisapproval.new, remote: true, html: { id: "detailed-rejection-form" }) do |f| %>
<%= f.hidden_field :post_id, value: "x" %>
<%= f.input :reason, collection: PostDisapproval::REASONS.map { |x| [x.humanize, x] } %>
<%= f.input :message, as: :string %>
<% end %>
<% end %>
</div>