diff options
author | schwedenmut <schwedenmut@googlemail.com> | 2018-04-26 14:18:32 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-04-26 14:18:32 +0300 |
commit | 54caf961641348e8983a31fa7fe855fd5bf94e18 (patch) | |
tree | aec47972325a80b14e73250234c42565f72d5f22 | |
parent | d08f2005d997ecb6eb9543b0c4eb1c86f3f9af68 (diff) |
Resolve "User deletion modal with same info for delete user / delete user and contributions"
4 files changed, 12 insertions, 7 deletions
diff --git a/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue b/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue index 0e3ac636661..9ce176744ba 100644 --- a/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue +++ b/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue @@ -52,16 +52,15 @@ text() { const keepContributionsText = s__(`AdminArea| You are about to permanently delete the user %{username}. - This will delete all of the issues, merge requests, and groups linked to them. + Issues, merge requests, and groups linked to them will be transferred to a system-wide "Ghost-user". To avoid data loss, consider using the %{strong_start}block user%{strong_end} feature instead. Once you %{strong_start}Delete user%{strong_end}, it cannot be undone or recovered.`); const deleteContributionsText = s__(`AdminArea| You are about to permanently delete the user %{username}. - Issues, merge requests, and groups linked to them will be transferred to a system-wide "Ghost-user". + This will delete all of the issues, merge requests, and groups linked to them. To avoid data loss, consider using the %{strong_start}block user%{strong_end} feature instead. Once you %{strong_start}Delete user%{strong_end}, it cannot be undone or recovered.`); - return sprintf(this.deleteContributions ? deleteContributionsText : keepContributionsText, { username: `<strong>${_.escape(this.username)}</strong>`, diff --git a/app/views/admin/users/_user.html.haml b/app/views/admin/users/_user.html.haml index 2ff4221efbd..badf3dd74b3 100644 --- a/app/views/admin/users/_user.html.haml +++ b/app/views/admin/users/_user.html.haml @@ -43,7 +43,7 @@ delete_user_url: admin_user_path(user), block_user_url: block_admin_user_path(user), username: user.name, - delete_contributions: 'false' }, type: 'button' } + delete_contributions: false }, type: 'button' } = s_('AdminUsers|Delete user') %li @@ -52,5 +52,5 @@ delete_user_url: admin_user_path(user, hard_delete: true), block_user_url: block_admin_user_path(user), username: user.name, - delete_contributions: 'true' }, type: 'button' } + delete_contributions: true }, type: 'button' } = s_('AdminUsers|Delete user and contributions') diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index ec3be869797..814ccdae8f3 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -183,7 +183,7 @@ delete_user_url: admin_user_path(@user), block_user_url: block_admin_user_path(@user), username: @user.name, - delete_contributions: 'false' }, type: 'button' } + delete_contributions: false }, type: 'button' } = s_('AdminUsers|Delete user') - else - if @user.solo_owned_groups.present? @@ -215,7 +215,7 @@ delete_user_url: admin_user_path(@user, hard_delete: true), block_user_url: block_admin_user_path(@user), username: @user.name, - delete_contributions: 'true' }, type: 'button' } + delete_contributions: true }, type: 'button' } = s_('AdminUsers|Delete user and contributions') - else %p diff --git a/changelogs/unreleased/45451-user-deletion-modal-with-same-info-for-delete-user-or-delete-user-and-contributions.yml b/changelogs/unreleased/45451-user-deletion-modal-with-same-info-for-delete-user-or-delete-user-and-contributions.yml new file mode 100644 index 00000000000..707a18745c8 --- /dev/null +++ b/changelogs/unreleased/45451-user-deletion-modal-with-same-info-for-delete-user-or-delete-user-and-contributions.yml @@ -0,0 +1,6 @@ +--- +title: Correct text and functionality for delete user / delete user and contributions + modal. +merge_request: 18463 +author: Marc Schwede +type: fixed |