Model#search: factor out username search.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<h1>Disapprovals</h1>
|
||||
|
||||
<%= simple_form_for(:search, url: moderator_post_disapprovals_path, method: :get, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
|
||||
<%= f.input :creator_name, label: "Creator", input_html: { value: params[:search][:creator_name] } %>
|
||||
<%= 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" } } %>
|
||||
<%= f.input :message_matches, label: "Message", input_html: { value: params[:search][:message_matches] } %>
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
<div id="a-search">
|
||||
<%= simple_form_for(:search, url: users_path, method: :get, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
|
||||
<%= f.input :name_matches, label: "Name", hint: "Use * for wildcard", input_html: { value: params[:search][:name_matches], data: { autocomplete: "user" } } %>
|
||||
<%= f.simple_fields_for :inviter do |sub| %>
|
||||
<%= sub.input :name_matches, label: "Inviter Name", hint: "Use * for wildcard", input_html: { value: params.dig(:search, :inviter, :name_matches), data: { autocomplete: "user" } } %>
|
||||
<% end %>
|
||||
<%= f.input :inviter_name, label: "Inviter Name", hint: "Use * for wildcard", input_html: { value: params.dig(:search, :inviter_name), data: { autocomplete: "user" } } %>
|
||||
|
||||
<%= f.input :level, collection: User.level_hash.to_a, include_blank: true, selected: params[:search][:level] %>
|
||||
<%= f.input :min_level, collection: User.level_hash.to_a, include_blank: true, selected: params[:search][:min_level] %>
|
||||
|
||||
Reference in New Issue
Block a user