From: André Peters Date: Wed, 3 May 2017 11:05:50 +0000 (+0200) Subject: Fixes saving action scores in WebUI X-Git-Tag: 1.6.0~279^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F1612%2Fhead;p=rspamd.git Fixes saving action scores in WebUI Variable elts was not updated and always returned the previously set values. --- diff --git a/interface/js/app/config.js b/interface/js/app/config.js index 7b8ec9710..a5ec6c341 100644 --- a/interface/js/app/config.js +++ b/interface/js/app/config.js @@ -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 +});