diff --git a/app/assets/javascripts/discourse/app/controllers/group.js b/app/assets/javascripts/discourse/app/controllers/group.js index 2c2967981d2..6ee7e58e1d3 100644 --- a/app/assets/javascripts/discourse/app/controllers/group.js +++ b/app/assets/javascripts/discourse/app/controllers/group.js @@ -137,7 +137,8 @@ export default Controller.extend({ this.set("destroying", true); const model = this.model; - let message = I18n.t("admin.groups.delete_confirm"); + const title = I18n.t("admin.groups.delete_confirm"); + let message = null; if (model.has_messages && model.message_count > 0) { message = I18n.t("admin.groups.delete_with_messages_confirm", { @@ -145,7 +146,8 @@ export default Controller.extend({ }); } - this.dialog.yesNoConfirm({ + this.dialog.deleteConfirm({ + title, message, didConfirm: () => { model diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index c3527e044b3..b34e9bc913c 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -4443,10 +4443,10 @@ en: about: "Edit your group membership and names here" group_members: "Group members" delete: "Delete" - delete_confirm: "Delete this group?" + delete_confirm: "Are you sure you want to delete this group?" delete_with_messages_confirm: - one: "Deleting this group will cause %{count} message to be orphaned, group members will no longer have access to it.

Are you sure?" - other: "Deleting this group will cause %{count} messages to be orphaned, group members will no longer have access to them.

Are you sure?" + one: "Deleting this group will cause %{count} message to be orphaned, group members will no longer have access to it." + other: "Deleting this group will cause %{count} messages to be orphaned, group members will no longer have access to them." delete_failed: "Unable to delete group. If this is an automatic group, it cannot be destroyed." delete_automatic_group: This is an automatic group and cannot be deleted. delete_owner_confirm: "Remove owner privilege for '%{username}'?"