/posts/:id - add dtext preview to flag/appeal dialogs.

This commit is contained in:
evazion
2017-04-13 15:07:53 -05:00
parent 441022960a
commit c90614272a
3 changed files with 14 additions and 10 deletions

View File

@@ -1,6 +1,9 @@
<%= format_text(WikiPage.titled(Danbooru.config.appeal_notice_wiki_page).first.try(&:body), :ragel => true) %>
<%= form_tag(post_appeals_path(:format => :js), :remote => true) do %>
<%= hidden_field_tag "post_appeal[post_id]", @post_appeal.post_id %>
<%= text_area :post_appeal, :reason, :size => "40x5" %>
<!-- XXX dtext_field expects there to be a `post_appeal` instance variable. -->
<% @post_appeal = post_appeal %>
<%= simple_form_for(@post_appeal, format: :js, remote: true) do |f| %>
<%= f.hidden_field :post_id %>
<%= dtext_field "post_appeal", "reason", preview_id: "dtext-preview-for-post-appeal" %>
<%= dtext_preview_button "post_appeal", "reason", preview_id: "dtext-preview-for-post-appeal" %>
<% end %>