2007-10-20 12:47:05 +00:00
|
|
|
<div class="contextual">
|
2015-01-17 14:14:12 +00:00
|
|
|
<%= additional_emails_link(@user) %>
|
2024-10-19 10:06:26 +00:00
|
|
|
<%= link_to(sprite_icon('key', l(:button_change_password)), { :action => 'password'}, :class => 'icon icon-passwd') if @user.change_password_allowed? %>
|
2025-10-07 06:51:33 +00:00
|
|
|
<%= link_to sprite_icon('webhook', l(:label_webhook_plural)), webhooks_path, class: 'icon icon-webhook' if @user.allowed_to?(:use_webhooks, nil, global: true) %>
|
2025-06-12 07:09:03 +00:00
|
|
|
<%= link_to(sprite_icon('apps', l('label_oauth_authorized_application_plural')), oauth_authorized_applications_path, :class => 'icon icon-applications') if Setting.rest_api_enabled? %>
|
2009-11-25 01:14:19 +00:00
|
|
|
<%= call_hook(:view_my_account_contextual, :user => @user)%>
|
2007-10-20 12:47:05 +00:00
|
|
|
</div>
|
2011-07-03 12:21:37 +00:00
|
|
|
|
2015-06-27 09:46:18 +00:00
|
|
|
<h2>
|
|
|
|
|
<%= avatar_edit_link(@user, :size => "50") %>
|
|
|
|
|
<%=l(:label_my_account)%>
|
|
|
|
|
</h2>
|
|
|
|
|
|
2011-07-03 12:23:11 +00:00
|
|
|
<%= error_messages_for 'user' %>
|
2007-03-12 17:59:02 +00:00
|
|
|
|
2012-04-25 17:17:49 +00:00
|
|
|
<%= labelled_form_for :user, @user,
|
2012-01-03 10:13:00 +00:00
|
|
|
:url => { :action => "account" },
|
|
|
|
|
:html => { :id => 'my_account_form',
|
2019-06-16 09:34:49 +00:00
|
|
|
:method => :put, :multipart => true } do |f| %>
|
2019-01-12 02:51:41 +00:00
|
|
|
<div class="splitcontent">
|
2007-10-20 12:47:05 +00:00
|
|
|
<div class="splitcontentleft">
|
2011-07-03 12:21:37 +00:00
|
|
|
<fieldset class="box tabular">
|
2011-09-16 23:55:26 +00:00
|
|
|
<legend><%=l(:label_information_plural)%></legend>
|
|
|
|
|
<p><%= f.text_field :firstname, :required => true %></p>
|
|
|
|
|
<p><%= f.text_field :lastname, :required => true %></p>
|
|
|
|
|
<p><%= f.text_field :mail, :required => true %></p>
|
2014-01-24 10:28:12 +00:00
|
|
|
<% unless @user.force_default_language? %>
|
2011-09-16 23:55:26 +00:00
|
|
|
<p><%= f.select :language, lang_options_for_select %></p>
|
2014-01-24 10:28:12 +00:00
|
|
|
<% end %>
|
2020-08-29 06:37:09 +00:00
|
|
|
<% if Setting.twofa? -%>
|
2020-08-29 06:21:50 +00:00
|
|
|
<p>
|
|
|
|
|
<label><%=l :setting_twofa -%></label>
|
|
|
|
|
<% if @user.twofa_active? %>
|
|
|
|
|
<%=l 'twofa_currently_active', twofa_scheme_name: l("twofa__#{@user.twofa_scheme}__name") -%><br/>
|
|
|
|
|
<%= link_to l('button_disable'), { controller: 'twofa', action: 'deactivate_init', scheme: @user.twofa_scheme }, method: :post -%><br/>
|
2020-08-29 06:51:21 +00:00
|
|
|
<%= 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 } -%>
|
2020-08-29 06:21:50 +00:00
|
|
|
<% else %>
|
|
|
|
|
<% Redmine::Twofa.available_schemes.each do |s| %>
|
|
|
|
|
<%= link_to l("twofa__#{s}__label_activate"), { controller: 'twofa', action: 'activate_init', scheme: s }, method: :post -%><br/>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</p>
|
2020-08-29 06:37:09 +00:00
|
|
|
<% end -%>
|
2011-09-16 23:55:26 +00:00
|
|
|
|
|
|
|
|
<% @user.custom_field_values.select(&:editable?).each do |value| %>
|
|
|
|
|
<p><%= custom_field_tag_with_label :user, value %></p>
|
|
|
|
|
<% end %>
|
|
|
|
|
<%= call_hook(:view_my_account, :user => @user, :form => f) %>
|
2011-07-03 12:21:37 +00:00
|
|
|
</fieldset>
|
2007-03-12 17:59:02 +00:00
|
|
|
|
2015-11-08 12:50:26 +00:00
|
|
|
<p class="mobile-hide"><%= submit_tag l(:button_save) %></p>
|
2007-10-20 12:47:05 +00:00
|
|
|
</div>
|
2006-09-02 13:33:23 +00:00
|
|
|
|
2007-10-20 12:47:05 +00:00
|
|
|
<div class="splitcontentright">
|
2011-07-03 12:21:37 +00:00
|
|
|
<fieldset class="box">
|
2011-09-16 23:55:26 +00:00
|
|
|
<legend><%=l(:field_mail_notification)%></legend>
|
|
|
|
|
<%= render :partial => 'users/mail_notifications' %>
|
2011-07-03 12:21:37 +00:00
|
|
|
</fieldset>
|
|
|
|
|
|
2022-03-19 10:14:29 +00:00
|
|
|
<fieldset class="box">
|
|
|
|
|
<legend><%=l(:label_auto_watch_on)%></legend>
|
|
|
|
|
<%= render :partial => 'users/auto_watch_on' %>
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
2011-07-03 12:21:37 +00:00
|
|
|
<fieldset class="box tabular">
|
2011-09-16 23:55:26 +00:00
|
|
|
<legend><%=l(:label_preferences)%></legend>
|
|
|
|
|
<%= render :partial => 'users/preferences' %>
|
2013-08-05 18:29:29 +00:00
|
|
|
<%= call_hook(:view_my_account_preferences, :user => @user, :form => f) %>
|
2011-07-03 12:21:37 +00:00
|
|
|
</fieldset>
|
2009-12-23 06:27:28 +00:00
|
|
|
|
2015-11-08 12:50:26 +00:00
|
|
|
<p class="mobile-show"><%= submit_tag l(:button_save) %></p>
|
2007-10-20 12:47:05 +00:00
|
|
|
</div>
|
2019-01-12 02:51:41 +00:00
|
|
|
</div>
|
2007-03-12 17:59:02 +00:00
|
|
|
<% end %>
|
2007-09-22 13:17:49 +00:00
|
|
|
|
|
|
|
|
<% content_for :sidebar do %>
|
2007-10-20 12:47:05 +00:00
|
|
|
<%= render :partial => 'sidebar' %>
|
2007-09-22 13:17:49 +00:00
|
|
|
<% end %>
|
2007-12-07 18:42:40 +00:00
|
|
|
|
2008-01-02 22:41:53 +00:00
|
|
|
<% html_title(l(:label_my_account)) -%>
|