diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-05-27 11:57:49 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-05-27 11:57:49 +0000 |
commit | f335e943ad807de82f8ff860922d9c9aa2f3a3bc (patch) | |
tree | 8845ec07785f7e7395bb085331f2ef7dd797db8b /app/views/users | |
parent | f04225321c3ea0b56699fd667611ec867c6c458d (diff) | |
download | redmine-f335e943ad807de82f8ff860922d9c9aa2f3a3bc.tar.gz redmine-f335e943ad807de82f8ff860922d9c9aa2f3a3bc.zip |
Password fields hidden on users/add form when selecting an external authentication mode.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@547 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/users')
-rw-r--r-- | app/views/users/_form.rhtml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/views/users/_form.rhtml b/app/views/users/_form.rhtml index 43540e67c..56b157986 100644 --- a/app/views/users/_form.rhtml +++ b/app/views/users/_form.rhtml @@ -20,14 +20,16 @@ <div class="box"> <h3><%=l(:label_authentication)%></h3> <% unless @auth_sources.empty? %> -<p><%= f.select :auth_source_id, [[l(:label_internal), ""]] + @auth_sources.collect { |a| [a.name, a.id] } %></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 %> +<div id="password_fields" style="<%= 'display:none;' if @user.auth_source %>"> <p><label for="password"><%=l(:field_password)%><span class="required"> *</span></label> <%= password_field_tag 'password', nil, :size => 25 %><br /> <em><%= l(:text_length_between, 4, 12) %></em></p> <p><label for="password_confirmation"><%=l(:field_password_confirmation)%><span class="required"> *</span></label> <%= password_field_tag 'password_confirmation', nil, :size => 25 %></p> </div> +</div> <!--[eoform:user]--> <% content_for :header_tags do %> |