post replacements: fix dialog submit not working.

This commit is contained in:
evazion
2020-01-21 00:54:07 -06:00
parent f2f236c23a
commit 8881edaf9f
2 changed files with 3 additions and 1 deletions

View File

@@ -3,7 +3,7 @@
<%= format_text(WikiPage.titled(Danbooru.config.replacement_notice_wiki_page).first.try(&:body)) %>
</div>
<%= edit_form_for(post_replacement, url: post_replacements_path(post_id: post_replacement.post_id), method: :post) do |f| %>
<%= edit_form_for(post_replacement, url: post_replacements_path(post_id: post_replacement.post_id), method: :post, remote: true) do |f| %>
<%= f.input :replacement_file, label: "File", as: :file %>
<%= f.input :replacement_url, label: "Replacement URL", hint: "The source URL to download the replacement from.", as: :string, input_html: { value: post_replacement.post.normalized_source } %>
<%= f.input :final_source, label: "Final Source", hint: "If present, the source field will be changed to this after replacement.", as: :string, input_html: { value: post_replacement.post.source } %>

View File

@@ -0,0 +1,2 @@
Danbooru.notice("Post replaced.");
location.reload();