diff options
Diffstat (limited to 'app/views/profiles')
-rw-r--r-- | app/views/profiles/accounts/show.html.haml | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/app/views/profiles/accounts/show.html.haml b/app/views/profiles/accounts/show.html.haml index 8abbd828032..7f79168dfb3 100644 --- a/app/views/profiles/accounts/show.html.haml +++ b/app/views/profiles/accounts/show.html.haml @@ -97,21 +97,29 @@ .row.prepend-top-default .col-lg-4.profile-settings-sidebar %h4.prepend-top-0.danger-title - Remove account + = s_('Profiles|Delete account') .col-lg-8 - if @user.can_be_removed? && can?(current_user, :destroy_user, @user) %p - Deleting an account has the following effects: + = s_('Profiles|Deleting an account has the following effects:') = render 'users/deletion_guidance', user: current_user - = link_to 'Delete account', user_registration_path, data: { confirm: "REMOVE #{current_user.name}? Are you sure?" }, method: :delete, class: "btn btn-remove" + + #delete-account-modal{ data: { action_url: user_registration_path, + confirm_with_password: ('true' if current_user.confirm_deletion_with_password?), + username: current_user.username } } + %button.btn.btn-danger.disabled + = s_('Profiles|Delete account') - else - if @user.solo_owned_groups.present? %p - Your account is currently an owner in these groups: + = s_('Profiles|Your account is currently an owner in these groups:') %strong= @user.solo_owned_groups.map(&:name).join(', ') %p - You must transfer ownership or delete these groups before you can delete your account. + = s_('Profiles|You must transfer ownership or delete these groups before you can delete your account.') - else %p - You don't have access to delete this user. + = s_("Profiles|You don't have access to delete this user.") .append-bottom-default + +- content_for :page_specific_javascripts do + = webpack_bundle_tag('account') |