##// END OF EJS Templates
Hide openid stuff on my account if disabled (#699)....
Jean-Philippe Lang -
r2393:2807b9c927af
parent child
Show More
@@ -1,57 +1,59
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to(l(:button_change_password), :action => 'password') unless @user.auth_source_id %>
2 <%= link_to(l(:button_change_password), :action => 'password') unless @user.auth_source_id %>
3 </div>
3 </div>
4 <h2><%=l(:label_my_account)%></h2>
4 <h2><%=l(:label_my_account)%></h2>
5 <%= error_messages_for 'user' %>
5 <%= error_messages_for 'user' %>
6
6
7 <% form_for :user, @user, :url => { :action => "account" },
7 <% form_for :user, @user, :url => { :action => "account" },
8 :builder => TabularFormBuilder,
8 :builder => TabularFormBuilder,
9 :lang => current_language,
9 :lang => current_language,
10 :html => { :id => 'my_account_form' } do |f| %>
10 :html => { :id => 'my_account_form' } do |f| %>
11 <div class="splitcontentleft">
11 <div class="splitcontentleft">
12 <h3><%=l(:label_information_plural)%></h3>
12 <h3><%=l(:label_information_plural)%></h3>
13 <div class="box tabular">
13 <div class="box tabular">
14 <p><%= f.text_field :firstname, :required => true %></p>
14 <p><%= f.text_field :firstname, :required => true %></p>
15 <p><%= f.text_field :lastname, :required => true %></p>
15 <p><%= f.text_field :lastname, :required => true %></p>
16 <p><%= f.text_field :mail, :required => true %></p>
16 <p><%= f.text_field :mail, :required => true %></p>
17 <p><%= f.select :language, lang_options_for_select %></p>
17 <p><%= f.select :language, lang_options_for_select %></p>
18 <% if Setting.openid? %>
18 <p><%= f.text_field :identity_url %></p>
19 <p><%= f.text_field :identity_url %></p>
20 <% end %>
19
21
20 <% @user.custom_field_values.select(&:editable?).each do |value| %>
22 <% @user.custom_field_values.select(&:editable?).each do |value| %>
21 <p><%= custom_field_tag_with_label :user, value %></p>
23 <p><%= custom_field_tag_with_label :user, value %></p>
22 <% end %>
24 <% end %>
23 </div>
25 </div>
24
26
25 <%= submit_tag l(:button_save) %>
27 <%= submit_tag l(:button_save) %>
26 </div>
28 </div>
27
29
28 <div class="splitcontentright">
30 <div class="splitcontentright">
29 <h3><%=l(:field_mail_notification)%></h3>
31 <h3><%=l(:field_mail_notification)%></h3>
30 <div class="box">
32 <div class="box">
31 <%= select_tag 'notification_option', options_for_select(@notification_options, @notification_option),
33 <%= select_tag 'notification_option', options_for_select(@notification_options, @notification_option),
32 :onchange => 'if ($("notification_option").value == "selected") {Element.show("notified-projects")} else {Element.hide("notified-projects")}' %>
34 :onchange => 'if ($("notification_option").value == "selected") {Element.show("notified-projects")} else {Element.hide("notified-projects")}' %>
33 <% content_tag 'div', :id => 'notified-projects', :style => (@notification_option == 'selected' ? '' : 'display:none;') do %>
35 <% content_tag 'div', :id => 'notified-projects', :style => (@notification_option == 'selected' ? '' : 'display:none;') do %>
34 <p><% User.current.projects.each do |project| %>
36 <p><% User.current.projects.each do |project| %>
35 <label><%= check_box_tag 'notified_project_ids[]', project.id, @user.notified_projects_ids.include?(project.id) %> <%=h project.name %></label><br />
37 <label><%= check_box_tag 'notified_project_ids[]', project.id, @user.notified_projects_ids.include?(project.id) %> <%=h project.name %></label><br />
36 <% end %></p>
38 <% end %></p>
37 <p><em><%= l(:text_user_mail_option) %></em></p>
39 <p><em><%= l(:text_user_mail_option) %></em></p>
38 <% end %>
40 <% end %>
39 <p><label><%= check_box_tag 'no_self_notified', 1, @user.pref[:no_self_notified] %> <%= l(:label_user_mail_no_self_notified) %></label></p>
41 <p><label><%= check_box_tag 'no_self_notified', 1, @user.pref[:no_self_notified] %> <%= l(:label_user_mail_no_self_notified) %></label></p>
40 </div>
42 </div>
41
43
42 <h3><%=l(:label_preferences)%></h3>
44 <h3><%=l(:label_preferences)%></h3>
43 <div class="box tabular">
45 <div class="box tabular">
44 <% fields_for :pref, @user.pref, :builder => TabularFormBuilder, :lang => current_language do |pref_fields| %>
46 <% fields_for :pref, @user.pref, :builder => TabularFormBuilder, :lang => current_language do |pref_fields| %>
45 <p><%= pref_fields.check_box :hide_mail %></p>
47 <p><%= pref_fields.check_box :hide_mail %></p>
46 <p><%= pref_fields.select :time_zone, ActiveSupport::TimeZone.all.collect {|z| [ z.to_s, z.name ]}, :include_blank => true %></p>
48 <p><%= pref_fields.select :time_zone, ActiveSupport::TimeZone.all.collect {|z| [ z.to_s, z.name ]}, :include_blank => true %></p>
47 <p><%= pref_fields.select :comments_sorting, [[l(:label_chronological_order), 'asc'], [l(:label_reverse_chronological_order), 'desc']] %></p>
49 <p><%= pref_fields.select :comments_sorting, [[l(:label_chronological_order), 'asc'], [l(:label_reverse_chronological_order), 'desc']] %></p>
48 <% end %>
50 <% end %>
49 </div>
51 </div>
50 </div>
52 </div>
51 <% end %>
53 <% end %>
52
54
53 <% content_for :sidebar do %>
55 <% content_for :sidebar do %>
54 <%= render :partial => 'sidebar' %>
56 <%= render :partial => 'sidebar' %>
55 <% end %>
57 <% end %>
56
58
57 <% html_title(l(:label_my_account)) -%>
59 <% html_title(l(:label_my_account)) -%>
General Comments 0
You need to be logged in to leave comments. Login now