From: Fridolin Somers Date: Wed, 31 May 2017 14:24:51 +0000 (+0200) Subject: Bug 18707: Background jobs post disabled inputs X-Git-Url: http://git.equinoxoli.org/?p=koha-equinox.git;a=commitdiff_plain;h=e269d6e6e6c9d1e3e11ae43a7773f3026f4d801a 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 Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- 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 df40e13..5ddb405 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));