UX: add confirm dialog when rolling up IP ban entries

This commit is contained in:
Régis Hanol 2014-11-24 19:38:47 +01:00
parent d3d517108d
commit 2c38f969cc
2 changed files with 8 additions and 3 deletions

View file

@ -18,9 +18,13 @@ export default Ember.ArrayController.extend(Discourse.Presence, {
rollUp: function() {
var self = this;
this.set("loading", true)
return Discourse.ScreenedIpAddress.rollUp().then(function() {
self.send("show");
return bootbox.confirm(I18n.t("admin.logs.screened_ips.roll_up_confirm"), I18n.t("no_value"), I18n.t("yes_value"), function (confirmed) {
if (confirmed) {
self.set("loading", true)
return Discourse.ScreenedIpAddress.rollUp().then(function() {
self.send("show");
});
}
});
}
}

View file

@ -1862,6 +1862,7 @@ en:
title: "Screened IPs"
description: 'IP addresses that are being watched. Use "Allow" to whitelist IP addresses.'
delete_confirm: "Are you sure you want to remove the rule for %{ip_address}?"
roll_up_confirm: "Are you sure you want to roll up ban entries?"
actions:
block: "Block"
do_nothing: "Allow"