Model#search: factor out username search.
This commit is contained in:
@@ -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