From 457c9a8e727dff3167065954ef7269f2a6edb296 Mon Sep 17 00:00:00 2001
From: Jean-Philippe Lang
(http://, https://, svn://, file:///)') +
content_tag('p', form.text_field(:login, :size => 30)) +
- content_tag('p', form.password_field(:password, :size => 30))
+ content_tag('p', form.password_field(:password, :size => 30, :name => 'ignore',
+ :value => ((repository.new_record? || repository.password.blank?) ? '' : ('x'*15)),
+ :onfocus => "this.value=''; this.name='repository[password]';",
+ :onchange => "this.name='repository[password]';"))
end
def darcs_field_tags(form, repository)
diff --git a/app/views/auth_sources/_form.rhtml b/app/views/auth_sources/_form.rhtml
index 24d2913e3..3d148c11f 100644
--- a/app/views/auth_sources/_form.rhtml
+++ b/app/views/auth_sources/_form.rhtml
@@ -15,7 +15,10 @@
<%= text_field 'auth_source', 'account' %>
-<%= password_field 'auth_source', 'account_password' %>
+<%= password_field 'auth_source', 'account_password', :name => 'ignore', + :value => ((@auth_source.new_record? || @auth_source.account_password.blank?) ? '' : ('x'*15)), + :onfocus => "this.value=''; this.name='auth_source[account_password]';", + :onchange => "this.name='auth_source[account_password]';" %><%= text_field 'auth_source', 'base_dn', :size => 60 %>
-- 2.39.5