- <%= simple_form_for(:search, url: moderator_post_disapprovals_path, method: :get, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
+ <%= search_form_for(moderator_post_disapprovals_path) do |f| %>
<%= f.input :user_name, label: "Creator", input_html: { value: params[:search][:user_name] } %>
<%= f.input :post_id, label: "Post ID", input_html: { value: params[:search][:post_id] } %>
<%= f.input :post_tags_match, label: "Tags", input_html: { value: params[:search][:post_tags_match], data: { autocomplete: "tag-query" } } %>
diff --git a/app/views/notes/search.html.erb b/app/views/notes/search.html.erb
index 987fe1dd9..aed18b82a 100644
--- a/app/views/notes/search.html.erb
+++ b/app/views/notes/search.html.erb
@@ -2,7 +2,7 @@
Search Notes
- <%= simple_form_for(:search, url: notes_path, method: :get, defaults: { required: false }) do |f| %>
+ <%= search_form_for(notes_path) do |f| %>
<%= f.hidden_field :group_by, value: "note" %>
<%= f.input :body_matches, label: "Body" %>
diff --git a/app/views/post_appeals/_search.html.erb b/app/views/post_appeals/_search.html.erb
index a923564cd..2e8f24bac 100644
--- a/app/views/post_appeals/_search.html.erb
+++ b/app/views/post_appeals/_search.html.erb
@@ -1,4 +1,4 @@
-<%= simple_form_for(:search, url: post_appeals_path, method: :get, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
+<%= search_form_for(post_appeals_path) do |f| %>
<%= f.input :reason_matches, label: "Reason", hint: "Use * for wildcard searches", input_html: { value: params[:search][:reason_matches] } %>
<%= f.input :post_tags_match, label: "Tags", input_html: { value: params[:search][:post_tags_match], data: { autocomplete: "tag-query" } } %>
<%= f.input :post_id, label: "Post ID", input_html: { value: params[:search][:post_id] } %>
diff --git a/app/views/post_approvals/index.html.erb b/app/views/post_approvals/index.html.erb
index 8a960e8f5..e29379047 100644
--- a/app/views/post_approvals/index.html.erb
+++ b/app/views/post_approvals/index.html.erb
@@ -3,7 +3,7 @@
Approvals
<%= render "posts/partials/common/inline_blacklist" %>
- <%= simple_form_for(:search, url: post_approvals_path, method: :get, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
+ <%= search_form_for(post_approvals_path) do |f| %>
<%= f.input :user_name, label: "Approver", input_html: { value: params[:search][:user_name], data: { autocomplete: "user" } } %>
<%= f.input :post_tags_match, label: "Tags", input_html: { value: params[:search][:post_tags_match], data: { autocomplete: "tag-query" } } %>
<%= f.submit "Search" %>
diff --git a/app/views/post_flags/_search.html.erb b/app/views/post_flags/_search.html.erb
index c1fee8ae7..0a21bdf3e 100644
--- a/app/views/post_flags/_search.html.erb
+++ b/app/views/post_flags/_search.html.erb
@@ -1,4 +1,4 @@
-<%= simple_form_for(:search, url: post_flags_path, method: :get, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
+<%= search_form_for(post_flags_path) do |f| %>
<%= f.input :reason_matches, label: "Reason", hint: "Use * for wildcard searches", input_html: { value: params[:search][:reason_matches] } %>
<%= f.input :post_tags_match, label: "Tags", input_html: { value: params[:search][:post_tags_match], data: { autocomplete: "tag-query" } } %>
<%= f.input :post_id, label: "Post ID", input_html: { value: params[:search][:post_id] } %>
diff --git a/app/views/post_replacements/index.html.erb b/app/views/post_replacements/index.html.erb
index 427b22c91..31b8fcdfd 100644
--- a/app/views/post_replacements/index.html.erb
+++ b/app/views/post_replacements/index.html.erb
@@ -4,7 +4,7 @@
<%= render "posts/partials/common/inline_blacklist" %>
- <%= simple_form_for(:search, url: post_replacements_path, method: :get, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
+ <%= search_form_for(post_replacements_path) do |f| %>
<%= f.input :creator_name, label: "Replacer", input_html: { value: params[:search][:creator_name], data: { autocomplete: "user" } } %>
<%= f.input :post_tags_match, label: "Tags", input_html: { value: params[:search][:post_tags_match], data: { autocomplete: "tag-query" } } %>
<%= f.submit "Search" %>
diff --git a/app/views/saved_searches/index.html.erb b/app/views/saved_searches/index.html.erb
index 746c6b07c..cc4b1a21e 100644
--- a/app/views/saved_searches/index.html.erb
+++ b/app/views/saved_searches/index.html.erb
@@ -7,7 +7,7 @@
<% end %>
- <%= simple_form_for(:search, url: saved_searches_path, method: :get, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
+ <%= search_form_for(saved_searches_path) do |f| %>
<%= f.input :query_ilike, label: "Query", input_html: { value: params[:search][:query_ilike] } %>
<%= f.input :label, label: "Label", input_html: { value: params[:search][:label] } %>
<%= f.submit "Search" %>
diff --git a/app/views/tag_relationships/_search.html.erb b/app/views/tag_relationships/_search.html.erb
index 993e9e054..25769c9b9 100644
--- a/app/views/tag_relationships/_search.html.erb
+++ b/app/views/tag_relationships/_search.html.erb
@@ -1,6 +1,6 @@
<%# url %>
-<%= simple_form_for(:search, method: :get, url: url, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
+<%= search_form_for(url) do |f| %>
<%= f.input :name_matches, label: "Name", input_html: { value: params[:search][:name_matches], data: { autocomplete: "tag" } } %>
<%= f.input :status, label: "Status", collection: %w[Approved Active Pending Deleted Retired Processing Queued], include_blank: true, selected: params[:search][:status] %>
<%= f.simple_fields_for :antecedent_tag do |fa| %>
diff --git a/app/views/tags/_search.html.erb b/app/views/tags/_search.html.erb
index ff8100fec..3e83c5b18 100644
--- a/app/views/tags/_search.html.erb
+++ b/app/views/tags/_search.html.erb
@@ -1,4 +1,4 @@
-<%= simple_form_for(:search, url: tags_path, method: :get, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
+<%= search_form_for(tags_path) do |f| %>
<%= f.input :name_matches, label: "Name", hint: "Use * for wildcard", input_html: { value: params[:search][:name_matches], data: { autocomplete: "tag" } } %>
<%= f.input :category, label: "Category", collection: TagCategory.canonical_mapping.to_a, include_blank: true,selected: params[:search][:category] %>
<%= f.input :order, collection: [%w[Newest date], %w[Count count], %w[Name name]], include_blank: false, selected: params[:search][:order] %>
diff --git a/app/views/uploads/_search.html.erb b/app/views/uploads/_search.html.erb
index 8b7fa3e03..e90f300a4 100644
--- a/app/views/uploads/_search.html.erb
+++ b/app/views/uploads/_search.html.erb
@@ -1,4 +1,4 @@
-<%= simple_form_for(:search, url: uploads_path, method: :get, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
+<%= search_form_for(uploads_path) do |f| %>
<%= f.input :uploader_name, label: "Uploader", input_html: { value: params[:search][:uploader_name], data: { autocomplete: "user" } } %>
<%= f.input :post_tags_match, label: "Post Tags", input_html: { value: params[:search][:post_tags_match] } %>
<%= f.input :source_matches, label: "Source", input_html: { value: params[:search][:source_matches] } %>
diff --git a/app/views/users/search.html.erb b/app/views/users/search.html.erb
index 830769a54..f05264413 100644
--- a/app/views/users/search.html.erb
+++ b/app/views/users/search.html.erb
@@ -1,6 +1,6 @@
- <%= simple_form_for(:search, url: users_path, method: :get, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
+ <%= search_form_for(users_path) do |f| %>
<%= f.input :name_matches, label: "Name", hint: "Use * for wildcard", input_html: { value: params[:search][:name_matches], data: { autocomplete: "user" } } %>
<%= f.input :inviter_name, label: "Inviter Name", hint: "Use * for wildcard", input_html: { value: params.dig(:search, :inviter_name), data: { autocomplete: "user" } } %>