Skip to content

Commit

Permalink
Remove html5 option in search_result_form helper method
Browse files Browse the repository at this point in the history
HTML5 is the standard and search inputs are widely supported. It can be safely removed.
  • Loading branch information
sascha-karnatz committed Oct 28, 2024
1 parent d8d8388 commit 98f3046
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion app/helpers/alchemy/pg_search/search_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ module SearchHelper
#
def render_search_form(options = {})
default_options = {
html5: false,
class: "fulltext_search",
id: "search",
}
Expand Down
8 changes: 2 additions & 6 deletions app/views/alchemy/search/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
<% if search_result_page %>
<%= form_tag show_alchemy_page_path(search_result_page),
method: 'get', id: options[:id], class: options[:class] do %>
<% if options[:html5] %>
<%= search_field_tag :query, params[:query],
placeholder: Alchemy.t(:placeholder, scope: 'search_form') %>
<% else %>
<%= text_field_tag(:query, params[:query]) %>
<% end %>
<%= search_field_tag :query, params[:query],
placeholder: Alchemy.t(:placeholder, scope: 'search_form') %>
<%= submit_tag Alchemy.t(:submit, scope: 'search_form'), name: nil %>
<% end %>
<% end %>

0 comments on commit 98f3046

Please sign in to comment.