]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Revert "[WebUI] Fix saving actions from web interface (#769)" 928/head
authorAndrew Lewis <nerf@judo.za.org>
Mon, 5 Sep 2016 07:03:17 +0000 (09:03 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Mon, 5 Sep 2016 07:03:17 +0000 (09:03 +0200)
This reverts commit 692a0de56d09031d96864fc71bdefb361be41a33.

interface/js/rspamd.js

index 6cfca7373d8656e53a1bcb5e941757eaf4e2807e..129afcc54da8d0b5ff6d170038b0745bbcf412ed 100644 (file)
                                 html: '<div class="form-group">' +
                                     '<label class="control-label col-sm-2">' + label + '</label>' +
                                     '<div class="controls slider-controls col-sm-10">' +
-                                    '<input class="slider" type="slider" value="' + item.value + '" id="' + item.action + '">' +
+                                    '<input class="slider" type="slider" value="' + item.value + '">' +
                                     '</div>' +
                                     '</div>'
                             });
             var url = 'saveactions';
             var values = [];
             // Rspamd order: [spam,probable_spam,greylist]
-            values[0] = parseFloat(document.getElementById('reject').value);
-            values[1] = parseFloat(document.getElementById('add header').value);
-            values[2] = parseFloat(document.getElementById('greylist').value);
+            values[0] = parseFloat(inputs[2].value);
+            values[1] = parseFloat(inputs[1].value);
+            values[2] = parseFloat(inputs[0].value);
             $.ajax({
                 data: JSON.stringify(values),
                 dataType: 'json',