##// END OF EJS Templates
Password fields hidden on users/add form when selecting an external authentication mode....
Jean-Philippe Lang -
r544:f335e943ad80
parent child
Show More
@@ -20,14 +20,16
20 <div class="box">
20 <div class="box">
21 <h3><%=l(:label_authentication)%></h3>
21 <h3><%=l(:label_authentication)%></h3>
22 <% unless @auth_sources.empty? %>
22 <% unless @auth_sources.empty? %>
23 <p><%= f.select :auth_source_id, [[l(:label_internal), ""]] + @auth_sources.collect { |a| [a.name, a.id] } %></p>
23 <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>
24 <% end %>
24 <% end %>
25 <div id="password_fields" style="<%= 'display:none;' if @user.auth_source %>">
25 <p><label for="password"><%=l(:field_password)%><span class="required"> *</span></label>
26 <p><label for="password"><%=l(:field_password)%><span class="required"> *</span></label>
26 <%= password_field_tag 'password', nil, :size => 25 %><br />
27 <%= password_field_tag 'password', nil, :size => 25 %><br />
27 <em><%= l(:text_length_between, 4, 12) %></em></p>
28 <em><%= l(:text_length_between, 4, 12) %></em></p>
28 <p><label for="password_confirmation"><%=l(:field_password_confirmation)%><span class="required"> *</span></label>
29 <p><label for="password_confirmation"><%=l(:field_password_confirmation)%><span class="required"> *</span></label>
29 <%= password_field_tag 'password_confirmation', nil, :size => 25 %></p>
30 <%= password_field_tag 'password_confirmation', nil, :size => 25 %></p>
30 </div>
31 </div>
32 </div>
31 <!--[eoform:user]-->
33 <!--[eoform:user]-->
32
34
33 <% content_for :header_tags do %>
35 <% content_for :header_tags do %>
General Comments 0
You need to be logged in to leave comments. Login now