From ba9d6870d71b5d869e649b430b741f090195e4c8 Mon Sep 17 00:00:00 2001 From: firedranzer Date: Tue, 6 Mar 2018 10:34:41 +0530 Subject: [PATCH] alertmessage for each negative value --- interface/js/app/config.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/interface/js/app/config.js b/interface/js/app/config.js index d591abd53..3af4005d0 100644 --- a/interface/js/app/config.js +++ b/interface/js/app/config.js @@ -226,7 +226,16 @@ function($) { }); } else{ - alert("Greylist can not be negative"); + if(eltsArray[0]<0){ + rspamd.alertMessage('alert-modal alert-error', 'spam can not be negative'); + } + else if(eltsArray[1]<0){ + rspamd.alertMessage('alert-modal alert-error', 'probable_spam can not be negative'); + } + else if(eltsArray[2]<0){ + rspamd.alertMessage('alert-modal alert-error', 'greylist can not be negative'); + } + } }); $('#saveActionsBtn').on('click', function() { @@ -240,7 +249,16 @@ function($) { }); } else{ - alert("Greylist can not be negative"); + if(eltsArray[0]<0){ + rspamd.alertMessage('alert-modal alert-error', 'spam can not be negative'); + } + else if(eltsArray[1]<0){ + rspamd.alertMessage('alert-modal alert-error', 'probable_spam can not be negative'); + } + else if(eltsArray[2]<0){ + rspamd.alertMessage('alert-modal alert-error', 'greylist can not be negative'); + } + } }); }, -- 2.39.5