##// 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
@@ -1,38 +1,40
1 1 <%= error_messages_for 'user' %>
2 2
3 3 <!--[form:user]-->
4 4 <div class="box">
5 5 <h3><%=l(:label_information_plural)%></h3>
6 6 <p><%= f.text_field :login, :required => true, :size => 25 %></p>
7 7 <p><%= f.text_field :firstname, :required => true %></p>
8 8 <p><%= f.text_field :lastname, :required => true %></p>
9 9 <p><%= f.text_field :mail, :required => true %></p>
10 10 <p><%= f.select :language, lang_options_for_select %></p>
11 11
12 12 <% for @custom_value in @custom_values %>
13 13 <p><%= custom_field_tag_with_label @custom_value %></p>
14 14 <% end if @custom_values%>
15 15
16 16 <p><%= f.check_box :admin %></p>
17 17 <p><%= f.check_box :mail_notification %></p>
18 18 </div>
19 19
20 20 <div class="box">
21 21 <h3><%=l(:label_authentication)%></h3>
22 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 24 <% end %>
25 <div id="password_fields" style="<%= 'display:none;' if @user.auth_source %>">
25 26 <p><label for="password"><%=l(:field_password)%><span class="required"> *</span></label>
26 27 <%= password_field_tag 'password', nil, :size => 25 %><br />
27 28 <em><%= l(:text_length_between, 4, 12) %></em></p>
28 29 <p><label for="password_confirmation"><%=l(:field_password_confirmation)%><span class="required"> *</span></label>
29 30 <%= password_field_tag 'password_confirmation', nil, :size => 25 %></p>
30 31 </div>
32 </div>
31 33 <!--[eoform:user]-->
32 34
33 35 <% content_for :header_tags do %>
34 36 <%= javascript_include_tag 'calendar/calendar' %>
35 37 <%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
36 38 <%= javascript_include_tag 'calendar/calendar-setup' %>
37 39 <%= stylesheet_link_tag 'calendar' %>
38 40 <% end %> No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now