]> source.dussan.org Git - rspamd.git/commitdiff
alertmessage for each negative value
authorfiredranzer <rupeshharode@gmail.com>
Tue, 6 Mar 2018 05:04:41 +0000 (10:34 +0530)
committerfiredranzer <rupeshharode@gmail.com>
Tue, 6 Mar 2018 05:04:41 +0000 (10:34 +0530)
interface/js/app/config.js

index d591abd53925ff70c2612c7e11caaa53bf738245..3af4005d08a095460326bd86170faddeda48661f 100644 (file)
@@ -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');
+                        }
+                        
                     }
                 });
             },