diff --git a/app/assets/javascripts/admin/components/ip-lookup.js.es6 b/app/assets/javascripts/admin/components/ip-lookup.js.es6 index cf9829f7e58..b7dbaf764b2 100644 --- a/app/assets/javascripts/admin/components/ip-lookup.js.es6 +++ b/app/assets/javascripts/admin/components/ip-lookup.js.es6 @@ -43,17 +43,20 @@ export default Ember.Component.extend({ deleteAllOtherAccounts: function() { var self = this; - this.setProperties({ other_accounts: null, otherAccountsLoading: true }); - - Discourse.ajax("/admin/users/delete-others-with-same-ip.json", { - type: "DELETE", - data: { - "ip": this.get("ip"), - "exclude": this.get("user_id"), - "order": "trust_level DESC" + bootbox.confirm(I18n.t("ip_lookup.confirm_delete_other_accounts"), I18n.t("no_value"), I18n.t("yes_value"), function (confirmed) { + if (confirmed) { + self.setProperties({ other_accounts: null, otherAccountsLoading: true }); + Discourse.ajax("/admin/users/delete-others-with-same-ip.json", { + type: "DELETE", + data: { + "ip": self.get("ip"), + "exclude": self.get("user_id"), + "order": "trust_level DESC" + } + }).then(function() { + self.send("lookup"); + }); } - }).then(function() { - self.send("lookup"); }); } } diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 43363649d98..664e6bda4c9 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -285,6 +285,7 @@ en: read_time: "read time" topics_entered: "topics entered" post_count: "# posts" + confirm_delete_other_accounts: "Are you sure you want to delete these accounts?" user: said: "{{username}}:"