autocomplete: add saved search label autocomplete in more places.

This commit is contained in:
evazion
2019-11-12 20:24:24 -06:00
parent cc98f3b7cc
commit f9881e5414
6 changed files with 25 additions and 38 deletions

View File

@@ -2,7 +2,7 @@
<%= simple_form_for(SavedSearch.new, remote: true) do |f| %>
<%= f.input :query, as: :string, input_html: { value: params[:tags], data: { autocomplete: "tag-query" } } %>
<%= f.input :label_string, label: "Labels", hint: "A list of tags to help categorize this search. Space delimited." %>
<%= f.input :label_string, label: "Labels", hint: "A list of tags to help categorize this search. Space delimited.", input_html: { "data-autocomplete": "saved-search-label" } %>
<%= f.input :disable_labels, label: "Don't show this dialog again", as: :boolean %>
<% end %>
</div>

View File

@@ -6,7 +6,7 @@
<%= simple_form_for(@saved_search) do |f| %>
<%= f.input :query, :as => :string %>
<%= f.input :label_string, :label => "Labels", :hint => "A list of tags to help categorize this search. Space delimited." %>
<%= f.input :label_string, label: "Labels", hint: "A list of tags to help categorize this search. Space delimited.", input_html: { "data-autocomplete": "saved-search-label" } %>
<%= f.button :submit, :value => "Submit" %>
<% end %>
</div>

View File

@@ -9,7 +9,7 @@
<%= search_form_for(saved_searches_path) do |f| %>
<%= f.input :query_ilike, label: "Query", hint: "Use * for wildcard", input_html: { value: params[:search][:query_ilike] } %>
<%= f.input :label, label: "Label", input_html: { value: params[:search][:label] } %>
<%= f.input :label, label: "Label", input_html: { value: params[:search][:label] }, input_html: { "data-autocomplete": "saved-search-label" } %>
<%= f.input :order, collection: [%w[Newest id], %w[Query query], %w[Label label]], include_blank: false, selected: params[:search][:order] %>
<%= f.submit "Search" %>
<% end %>