aboutsummaryrefslogtreecommitdiffstats
path: root/interface/js
diff options
context:
space:
mode:
authorandre.peters <andre.peters@servercow.de>2017-03-19 19:21:46 +0100
committerandre.peters <andre.peters@servercow.de>2017-03-19 19:21:46 +0100
commit4a6b328b353bedca8df0ca30865162108bb6547e (patch)
tree35e6cf190176481b121b51bd520a13adb4f171a6 /interface/js
parentf455d4ccc0ede23961521ceb2f41394cc1f9e2a9 (diff)
downloadrspamd-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.js7
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);