]> git.openstreetmap.org Git - rails.git/commitdiff
Turn off autocomplete on user settings form
authorJohn Firebaugh <john.firebaugh@gmail.com>
Fri, 16 Aug 2013 00:14:58 +0000 (17:14 -0700)
committerTom Hughes <tom@compton.nu>
Fri, 16 Aug 2013 20:43:41 +0000 (21:43 +0100)
This prevents annoying/useless autocompletion of the
"New Email Address" and "Password" fields.

app/views/user/account.html.erb

index a0979d5ae5cb80594954d62d17324a2d6cca61c8..0a2f056c2fe48d75a2437cc5c08f3f703eb029d0 100644 (file)
@@ -7,7 +7,7 @@
 <% end %>
 
 <%= error_messages_for 'user' %>
-<%= form_for :user, :html => { :multipart => true, :id => 'accountForm',:class => 'standard-form' } do |f| %>
+<%= form_for :user, :html => { :multipart => true, :id => 'accountForm', :class => 'standard-form', :autocomplete => :off } do |f| %>
   <fieldset>
     <div class="form-row">
       <label class="standard-label"><%= t 'user.new.display name' %></label>
@@ -24,7 +24,7 @@
 
     <div class="form-row">
       <label class="standard-label"><%= t 'user.account.new email address' %></label>
-      <%= f.email_field :new_email %>
+      <%= f.email_field :new_email, :autocomplete => :off %>
       <span class="form-help deemphasize"><%= t 'user.account.email never displayed publicly' %></span>
     </div>
   </fieldset>