From: Tom Hughes Date: Tue, 27 Jul 2021 18:36:47 +0000 (+0100) Subject: Add missing autocomplete attributes X-Git-Tag: live~2046 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/e842c7be9774531cf2d95230b7d2fecc5b5f65d9 Add missing autocomplete attributes --- diff --git a/app/views/browse/new_note.html.erb b/app/views/browse/new_note.html.erb index a9937c4bc..1db7609b3 100644 --- a/app/views/browse/new_note.html.erb +++ b/app/views/browse/new_note.html.erb @@ -5,8 +5,8 @@

<%= t("javascripts.notes.new.intro") %>

- - + +
diff --git a/app/views/browse/note.html.erb b/app/views/browse/note.html.erb index 0180e26ca..97787b178 100644 --- a/app/views/browse/note.html.erb +++ b/app/views/browse/note.html.erb @@ -62,7 +62,7 @@ <% end -%> <% else %> - +
<% if current_user and current_user.moderator? -%> " class="btn btn-light" data-note-id="<%= @note.id %>" data-method="DELETE" data-url="<%= note_url(@note, "json") %>"> diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 0aa9fea50..4f9d3dbd6 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -24,6 +24,7 @@ <%= text_field_tag :search_by_user, params[:search_by_user], :placeholder => t(".reported_user"), + :autocomplete => "on", :class => "form-control" %>
diff --git a/app/views/layouts/_search.html.erb b/app/views/layouts/_search.html.erb index e69ed6703..3f3513d3a 100644 --- a/app/views/layouts/_search.html.erb +++ b/app/views/layouts/_search.html.erb @@ -5,7 +5,7 @@
<%= link_to t("site.search.where_am_i"), "#", :class => "describe_location position-absolute", :title => t("site.search.where_am_i_title") %> - <%= text_field_tag "query", params[:query], :placeholder => t("site.search.search"), :autofocus => autofocus, :class => "form-control form-control-sm" %> + <%= text_field_tag "query", params[:query], :placeholder => t("site.search.search"), :autofocus => autofocus, :autocomplete => "on", :class => "form-control form-control-sm" %>
<%= submit_tag t("site.search.submit_text"), :class => "btn btn-sm btn-primary", :data => { :disable_with => false } %> @@ -26,7 +26,7 @@ <%= image_tag "marker-green.png", :class => "routing_marker mx-auto d-block", :data => { :type => "from" }, :draggable => "true" %>
- <%= text_field_tag "route_from", params[:from], :placeholder => t("site.search.from"), :class => "form-control form-control-sm" %> + <%= text_field_tag "route_from", params[:from], :placeholder => t("site.search.from"), :autocomplete => "on", :class => "form-control form-control-sm" %>
@@ -34,7 +34,7 @@ <%= image_tag "marker-red.png", :class => "routing_marker mx-auto d-block", :data => { :type => "to" }, :draggable => "true" %>
- <%= text_field_tag "route_to", params[:to], :placeholder => t("site.search.to"), :class => "form-control form-control-sm" %> + <%= text_field_tag "route_to", params[:to], :placeholder => t("site.search.to"), :autocomplete => "on", :class => "form-control form-control-sm" %>
diff --git a/app/views/messages/new.html.erb b/app/views/messages/new.html.erb index 2899c2ff7..663456ec7 100644 --- a/app/views/messages/new.html.erb +++ b/app/views/messages/new.html.erb @@ -3,7 +3,7 @@ <% end %> <%= bootstrap_form_for @message do |f| %> - <%= hidden_field_tag :display_name, @message.recipient.display_name %> + <%= hidden_field_tag :display_name, @message.recipient.display_name, :autocomplete => "off" %> <%= f.text_field :title %> <%= f.richtext_field :body, :cols => 80, :rows => 20 %> diff --git a/app/views/oauth_clients/index.html.erb b/app/views/oauth_clients/index.html.erb index 8e940e341..1db5d9db4 100644 --- a/app/views/oauth_clients/index.html.erb +++ b/app/views/oauth_clients/index.html.erb @@ -19,7 +19,7 @@ <%= token.authorized_at %> <%= form_tag({ :controller => "oauth", :action => "revoke" }) do %> - <%= hidden_field_tag "token", token.token %> + <%= hidden_field_tag "token", token.token, :autocomplete => "off" %> <%= submit_tag t(".revoke"), :class => "btn btn-sm btn-primary" %> <% end %> diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index fa0747c9c..25abdcde7 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb @@ -10,7 +10,7 @@

<%= t ".no account" %> <%= link_to t(".register now"), user_new_path(:referer => params[:referer]) %>

<%= bootstrap_form_tag(:action => "login", :html => { :id => "login_form" }) do |f| %> - <%= hidden_field_tag("referer", h(params[:referer])) %> + <%= hidden_field_tag("referer", h(params[:referer]), :autocomplete => "off") %> <%= f.text_field :username, :label => t(".email or username"), :tabindex => 1, :value => params[:username] %> <%= f.password_field :password, :label => t(".password"), :tabindex => 2, :value => "", :help => link_to(t(".lost password link"), :controller => "passwords", :action => "lost_password") %> @@ -51,8 +51,8 @@ <%= form_tag(auth_path(:provider => "openid"), :id => "openid_login_form") do %>
- <%= hidden_field_tag("referer", params[:referer]) %> - <%= text_field_tag("openid_url", "", :tabindex => 3, :class => "openid_url form-control") %> + <%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %> + <%= text_field_tag("openid_url", "", :tabindex => 3, :autocomplete => "on", :class => "openid_url form-control") %> (" target="_new"><%= t "users.account.openid.link text" %>)
diff --git a/app/views/site/export.html.erb b/app/views/site/export.html.erb index 9cbee91da..e612ff1af 100644 --- a/app/views/site/export.html.erb +++ b/app/views/site/export.html.erb @@ -3,16 +3,16 @@ <%= render "sidebar_header", :title => t(".title") %> <%= form_tag({ :controller => "export", :action => "finish" }, { :class => "export_form" }) do %> - <%= hidden_field_tag "format", "osm" %> + <%= hidden_field_tag "format", "osm", :autocomplete => "off" %>
- <%= text_field_tag("maxlat", nil, :size => 10, :class => "export_bound form-control mx-auto") %> + <%= text_field_tag("maxlat", nil, :size => 10, :autocomplete => "off", :class => "export_bound form-control mx-auto") %>
- <%= text_field_tag("minlon", nil, :size => 10, :class => "export_bound form-control") %> - <%= text_field_tag("maxlon", nil, :size => 10, :class => "export_bound form-control") %> + <%= text_field_tag("minlon", nil, :size => 10, :autocomplete => "off", :class => "export_bound form-control") %> + <%= text_field_tag("maxlon", nil, :size => 10, :autocomplete => "off", :class => "export_bound form-control") %>
- <%= text_field_tag("minlat", nil, :size => 10, :class => "export_bound form-control mx-auto") %> + <%= text_field_tag("minlat", nil, :size => 10, :autocomplete => "off", :class => "export_bound form-control mx-auto") %>
<%= t ".manually_select" %>
diff --git a/app/views/user_blocks/new.html.erb b/app/views/user_blocks/new.html.erb index c339d9f96..4dc7fd63c 100644 --- a/app/views/user_blocks/new.html.erb +++ b/app/views/user_blocks/new.html.erb @@ -5,7 +5,7 @@ user_path(@user))) %> <% end %> <%= bootstrap_form_for(@user_block) do |f| %> - <%= hidden_field_tag "display_name", @user.display_name %> + <%= hidden_field_tag "display_name", @user.display_name, :autocomplete => "off" %> <%= f.richtext_field :reason, :cols => 80, :rows => 20 %> <%= f.form_group do %>