FIX: Regression with admin user delete dialog buttons (#18179)

This also adds a test to prevent regressions and refactors the very similar delete dialog in the user summary screen.
This commit is contained in:
Penar Musaraj
2022-09-05 09:31:17 +02:00
committed by GitHub
parent f4e1d0c546
commit 7547878cde
6 changed files with 145 additions and 35 deletions

View File

@ -378,6 +378,7 @@ export default Controller.extend(CanCheckEmails, {
};
this.dialog.alert({
title: I18n.t("admin.user.delete_confirm_title"),
message: I18n.t("admin.user.delete_confirm"),
class: "delete-user-modal",
buttons: [
@ -385,7 +386,7 @@ export default Controller.extend(CanCheckEmails, {
label: I18n.t("admin.user.delete_dont_block"),
class: "btn-primary",
action: () => {
return performDestroy(true);
return performDestroy(false);
},
},
{
@ -393,7 +394,7 @@ export default Controller.extend(CanCheckEmails, {
label: I18n.t("admin.user.delete_and_block"),
class: "btn-danger",
action: () => {
return performDestroy(false);
return performDestroy(true);
},
},
{