Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

account.html.erb 2.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <div class="contextual">
  2. <%= additional_emails_link(@user) %>
  3. <%= link_to(l(:button_change_password), {:action => 'password'}, :class => 'icon icon-passwd') if @user.change_password_allowed? %>
  4. <%= call_hook(:view_my_account_contextual, :user => @user)%>
  5. </div>
  6. <h2>
  7. <%= avatar_edit_link(@user, :size => "50") %>
  8. <%=l(:label_my_account)%>
  9. </h2>
  10. <%= error_messages_for 'user' %>
  11. <%= labelled_form_for :user, @user,
  12. :url => { :action => "account" },
  13. :html => { :id => 'my_account_form',
  14. :method => :put, :multipart => true } do |f| %>
  15. <div class="splitcontent">
  16. <div class="splitcontentleft">
  17. <fieldset class="box tabular">
  18. <legend><%=l(:label_information_plural)%></legend>
  19. <p><%= f.text_field :firstname, :required => true %></p>
  20. <p><%= f.text_field :lastname, :required => true %></p>
  21. <p><%= f.text_field :mail, :required => true %></p>
  22. <% unless @user.force_default_language? %>
  23. <p><%= f.select :language, lang_options_for_select %></p>
  24. <% end %>
  25. <% if Setting.openid? %>
  26. <p><%= f.text_field :identity_url %></p>
  27. <% end %>
  28. <% if Setting.twofa? -%>
  29. <p>
  30. <label><%=l :setting_twofa -%></label>
  31. <% if @user.twofa_active? %>
  32. <%=l 'twofa_currently_active', twofa_scheme_name: l("twofa__#{@user.twofa_scheme}__name") -%><br/>
  33. <%= link_to l('button_disable'), { controller: 'twofa', action: 'deactivate_init', scheme: @user.twofa_scheme }, method: :post -%><br/>
  34. <%= link_to l('twofa_generate_backup_codes'), { controller: 'twofa_backup_codes', action: 'init' }, method: :post, data: { confirm: Redmine::Twofa.for_user(User.current).backup_codes.any? ? t('twofa_text_generate_backup_codes_confirmation') : nil } -%>
  35. <% else %>
  36. <% Redmine::Twofa.available_schemes.each do |s| %>
  37. <%= link_to l("twofa__#{s}__label_activate"), { controller: 'twofa', action: 'activate_init', scheme: s }, method: :post -%><br/>
  38. <% end %>
  39. <% end %>
  40. </p>
  41. <% end -%>
  42. <% @user.custom_field_values.select(&:editable?).each do |value| %>
  43. <p><%= custom_field_tag_with_label :user, value %></p>
  44. <% end %>
  45. <%= call_hook(:view_my_account, :user => @user, :form => f) %>
  46. </fieldset>
  47. <p class="mobile-hide"><%= submit_tag l(:button_save) %></p>
  48. </div>
  49. <div class="splitcontentright">
  50. <fieldset class="box">
  51. <legend><%=l(:field_mail_notification)%></legend>
  52. <%= render :partial => 'users/mail_notifications' %>
  53. </fieldset>
  54. <fieldset class="box tabular">
  55. <legend><%=l(:label_preferences)%></legend>
  56. <%= render :partial => 'users/preferences' %>
  57. <%= call_hook(:view_my_account_preferences, :user => @user, :form => f) %>
  58. </fieldset>
  59. <p class="mobile-show"><%= submit_tag l(:button_save) %></p>
  60. </div>
  61. </div>
  62. <% end %>
  63. <% content_for :sidebar do %>
  64. <%= render :partial => 'sidebar' %>
  65. <% end %>
  66. <% html_title(l(:label_my_account)) -%>