From 1ee78313d6b35c824c1a5dfc9d203deea4fc8690 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Wed, 31 May 2017 16:24:51 +0200 Subject: [PATCH] Bug 18707: Background jobs post disabled inputs For example, in Tools > Batch item modification input of deleted subfields are disabled. This form is posted using background job via JS code. Looks like this JS code converts a POST form into a GET URL, including inputs that are disabled : koha-tmpl/intranet-tmpl/prog/js/background-job-progressbar.js function submitBackgroundJob(f) { ... $(':input', f).each(function() { ... This patch add a :enabled to selector Test plan : Signed-off-by: Kyle M Hall --- koha-tmpl/intranet-tmpl/prog/js/background-job-progressbar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/background-job-progressbar.js b/koha-tmpl/intranet-tmpl/prog/js/background-job-progressbar.js index df40e13e80..5ddb4053c2 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/background-job-progressbar.js +++ b/koha-tmpl/intranet-tmpl/prog/js/background-job-progressbar.js @@ -42,7 +42,7 @@ function submitBackgroundJob(f) { // gather up form submission var inputs = []; - $(':input', f).each(function() { + $(':input:enabled', f).each(function() { if (this.type == 'radio' || this.type == 'checkbox') { if (this.checked) { inputs.push(this.name + '=' + encodeURIComponent(this.value)); -- 2.20.1 (Apple Git-117)