mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
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:
@ -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);
|
||||
},
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user