<%= simple_form_for(:search, url: post_flags_path, method: :get, defaults: { required: false }, html: { class: "inline-form" }) 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] } %> <% if CurrentUser.is_moderator? %> <%= f.input :creator_name, label: "Creator", input_html: { value: params[:search][:creator_name] } %> <% end %> <%= f.input :is_resolved, label: "Resolved?", collection: [["Yes", true], ["No", false]], include_blank: true, selected: params[:search][:is_resolved] %> <%= f.input :category, label: "Category", collection: ["normal", "unapproved", "rejected", "deleted", "banned", "duplicate"], include_blank: true, selected: params[:search][:category] %> <%= f.submit "Search" %> <% end %>