eBooru/app/views/post_flags/_new.html.erb

43 lines
1.2 KiB
Plaintext

<div class="flag-dialog-preview">
<div class="flag_post">
<%= PostPresenter.preview(@post, show_deleted: true, no_blacklist: true) %>
</div>
<div class="dtext-container">
<%= format_text(WikiPage.titled(Danbooru.config.flag_notice_wiki_page)&.body) %>
</div>
</div>
<div class="flag-dialog-body">
<%= error_messages_for :post_flag %>
<%= custom_form_for(post_flag) do |f| %>
<%= f.hidden_field :post_id %>
<% Danbooru.config.flag_reasons.each do |flag_reason| %>
<% if flag_reason[:name] == "uploading_guidelines" && !@post.flaggable_for_guidelines? %>
<% next %>
<% end %>
<label>
<%= radio_button_tag "post_flag[reason_name]", flag_reason[:name], false %>
<span class="flag-reason-title"><%= format_text(flag_reason[:reason], inline: true) %></span>
<div class="dtext-container flag-reason-text"><%= format_text(flag_reason[:text]) %></div>
</label>
<% if flag_reason[:parent] %>
<%= f.input :parent_id, as: :string, label: "Inferior of Post #" %>
<% end %>
<% end %>
<div>
<%= f.submit "Submit" %>
</div>
<% end %>
</div>