]> source.dussan.org Git - rspamd.git/commitdiff
Fixes saving action scores in WebUI 1612/head
authorAndré Peters <andryyy@users.noreply.github.com>
Wed, 3 May 2017 11:05:50 +0000 (13:05 +0200)
committerGitHub <noreply@github.com>
Wed, 3 May 2017 11:05:50 +0000 (13:05 +0200)
Variable elts was not updated and always returned the previously set values.

interface/js/app/config.js

index 7b8ec9710e3d0a9a80c4ef3dff2c6951f3ea5e4a..a5ec6c3416b87c796096d8c077cc0754f64018b7 100644 (file)
@@ -215,15 +215,15 @@ function($) {
                     $('#actionsFormField').attr('disabled', true);
                 }
 
-                var elts = loadActionsFromForm();
-
                 $('#saveActionsClusterBtn').on('click', function() {
+                    var elts = loadActionsFromForm();
                     rspamd.queryNeighbours('saveactions', null, null, "POST", {}, {
                         data: elts,
                         dataType: "json",
                     });
                 });
                 $('#saveActionsBtn').on('click', function() {
+                    var elts = loadActionsFromForm();
                     rspamd.queryLocal('saveactions', null, null, "POST", {}, {
                         data: elts,
                         dataType: "json",
@@ -287,4 +287,4 @@ function($) {
     interface.getMaps = getMaps;
 
     return interface;
-});
\ No newline at end of file
+});