From 85fafc57b223bba554caab2f9b6121c0582285e3 Mon Sep 17 00:00:00 2001 From: Alexander Moisseev Date: Sat, 15 Oct 2016 18:18:28 +0300 Subject: [PATCH] [WebUI] Ask for history reset confirmation Issue: #1027 Reported by: @fenice2 --- interface/js/rspamd.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/interface/js/rspamd.js b/interface/js/rspamd.js index da2c06917..7bb7cdf98 100644 --- a/interface/js/rspamd.js +++ b/interface/js/rspamd.js @@ -696,8 +696,11 @@ } }); } - // @update history log + // @reset history log $('#resetHistory').on('click', function () { + if (!confirm("Are you sure you want to reset history log?")) { + return + }; if (history) { history.destroy(); $('#historyLog').children('tbody').remove(); @@ -719,7 +722,7 @@ }); }); - // @reset history log + // @update history log $('#updateHistory').on('click', function () { getHistory(); }); -- 2.39.5