From: Tom Hughes Date: Fri, 7 Mar 2014 19:18:24 +0000 (+0000) Subject: Make the search form a GET form with no extra fields X-Git-Tag: live~4493^2 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/8c82be0537e1bbdcbd7f20d5f26deaae09774281 Make the search form a GET form with no extra fields We only accept GET requests for the search, and although the form is never normally submitted directly some browsers offer an option to create a bookmark from a form, so make that work. --- diff --git a/app/views/layouts/_search.html.erb b/app/views/layouts/_search.html.erb index 732e57d31..ed548e21c 100644 --- a/app/views/layouts/_search.html.erb +++ b/app/views/layouts/_search.html.erb @@ -1,7 +1,7 @@ -<%= form_tag search_path, :class => "search_form" do %> +
<%= submit_tag t('site.search.submit_text') %>
<%= text_field_tag "query", params[:query], :placeholder => t("site.search.search"), :autofocus => autofocus %> <%= link_to t('site.search.where_am_i'), '#', { :class => "describe_location", :title => t('site.search.where_am_i_title') } %>
-<% end %> +