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 :
<to define>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e269d6e6e6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8b9c96308f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Fridolin Somers 2017-05-31 16:24:51 +02:00 committed by Lucas Gass
parent 9963687308
commit 182caed9c3
1 changed files with 1 additions and 1 deletions

View File

@ -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));