A platform for community discussion. Free, open, simple.
UX: Improve UI of group delete dialog (#19292)
Penar Musaraj4c037b9ba39a
diff --git a/app/assets/javascripts/discourse/app/controllers/group.js b/app/assets/javascripts/discourse/app/controllers/group.jsindex 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: () => {modeldiff --git a/config/locales/client.en.yml b/config/locales/client.en.ymlindex 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.<br><br>Are you sure?"- other: "Deleting this group will cause %{count} messages to be orphaned, group members will no longer have access to them.<br><br>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}'?"