disable browser autocomplete on password fields on user edit view. #360

This commit is contained in:
Felix Schäfer 2011-05-05 21:25:34 +02:00
parent 6fa5eb895f
commit 87e055cf47
1 changed files with 2 additions and 2 deletions

View File

@ -25,9 +25,9 @@
<p><%= f.select :auth_source_id, ([[l(:label_internal), ""]] + @auth_sources.collect { |a| [a.name, a.id] }), {}, :onchange => "if (this.value=='') {Element.show('password_fields');} else {Element.hide('password_fields');}" %></p> <p><%= f.select :auth_source_id, ([[l(:label_internal), ""]] + @auth_sources.collect { |a| [a.name, a.id] }), {}, :onchange => "if (this.value=='') {Element.show('password_fields');} else {Element.hide('password_fields');}" %></p>
<% end %> <% end %>
<div id="password_fields" style="<%= 'display:none;' if @user.auth_source %>"> <div id="password_fields" style="<%= 'display:none;' if @user.auth_source %>">
<p><%= f.password_field :password, :required => true, :size => 25 %><br /> <p><%= f.password_field :password, :required => true, :size => 25, :autocomplete => :off %><br />
<em><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em></p> <em><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em></p>
<p><%= f.password_field :password_confirmation, :required => true, :size => 25 %></p> <p><%= f.password_field :password_confirmation, :required => true, :size => 25, :autocomplete => :off %></p>
</div> </div>
</div> </div>