From 7c32b8b50365812e3b15e6703cfade149fbe1b64 Mon Sep 17 00:00:00 2001 From: evazion Date: Tue, 11 Jan 2022 19:43:30 -0600 Subject: [PATCH] Fix #4466: Replacing a post does not correctly set the best source. Don't default the "Final source" field to the current source. This way the default will be to set the source to the normalized replacement URL. The "final source" field can be set to override this. --- app/views/post_replacements/_new.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/post_replacements/_new.html.erb b/app/views/post_replacements/_new.html.erb index 30a63ab92..f6552a7a0 100644 --- a/app/views/post_replacements/_new.html.erb +++ b/app/views/post_replacements/_new.html.erb @@ -4,7 +4,7 @@ <%= 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 } %> + <%= f.input :final_source, label: "Final Source", hint: "If present, the source field will be changed to this after replacement.", as: :string %> <%= f.input :tags, label: "Tags", as: :string, input_html: { value: post_replacement.suggested_tags_for_removal, data: { autocomplete: "tag-edit" } } %> <% end %>