diff options
author | andre.peters <andre.peters@servercow.de> | 2017-03-19 19:21:46 +0100 |
---|---|---|
committer | andre.peters <andre.peters@servercow.de> | 2017-03-19 19:21:46 +0100 |
commit | 4a6b328b353bedca8df0ca30865162108bb6547e (patch) | |
tree | 35e6cf190176481b121b51bd520a13adb4f171a6 /interface/js | |
parent | f455d4ccc0ede23961521ceb2f41394cc1f9e2a9 (diff) | |
download | rspamd-4a6b328b353bedca8df0ca30865162108bb6547e.tar.gz rspamd-4a6b328b353bedca8df0ca30865162108bb6547e.zip |
Use data id to identify input field
Diffstat (limited to 'interface/js')
-rw-r--r-- | interface/js/app/config.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/interface/js/app/config.js b/interface/js/app/config.js index 999adce88..7b8ec9710 100644 --- a/interface/js/app/config.js +++ b/interface/js/app/config.js @@ -136,7 +136,7 @@ function($) { function loadActionsFromForm() { var values = []; - var inputs = $('#actionsForm :input[type="slider"]'); + var inputs = $('#actionsForm :input[data-id="action"]'); // Rspamd order: [spam,probable_spam,greylist] values[0] = parseFloat(inputs[2].value); values[1] = parseFloat(inputs[1].value); @@ -183,7 +183,7 @@ function($) { 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 + '">' + + '<input class="action-scores form-control" data-id="action" type="number" value="' + item.value + '">' + '</div>' + '</div>' }); @@ -205,9 +205,10 @@ function($) { return e.html; }).join('') + '<br><div class="form-group">' + + '<div class="btn-group">' + '<button class="btn btn-primary" id="saveActionsBtn">Save actions</button>' + '<button class="btn btn-primary" id="saveActionsClusterBtn">Save cluster</button>' + - '</div></fieldset></form>'); + '</div></div></fieldset></form>'); if (rspamd.read_only) { $('#saveActionsClusterBtn').attr('disabled', true); $('#saveActionsBtn').attr('disabled', true); |