From: firedranzer Date: Tue, 6 Mar 2018 05:04:41 +0000 (+0530) Subject: alertmessage for each negative value X-Git-Tag: 1.7.0~54^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ba9d6870d71b5d869e649b430b741f090195e4c8;p=rspamd.git alertmessage for each negative value --- 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'); + } + } }); },