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() { ...
Created attachment 63866 [details] [review] 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>
submitBackgroundJob is used by : offline_circ/ process_koc.tt tools/ batch_record_modification.tt batchMod-del.tt batchMod-edit.tt manage-marc-import.tt stage-marc-import.tt Disabled input can exist in batchMod, what about the others ?
Can you further explain the bug? I'm not sure what you're describing here. 1. I go to /cgi-bin/koha/tools/batchMod.pl 2. I enter a barcode and submit the form 3. I see all the item fields that I can use for doing the batch edit What's "input of deleted subfields are disabled" mean?
(In reply to David Cook from comment #3) > Can you further explain the bug? I'm not sure what you're describing here. > > 1. I go to /cgi-bin/koha/tools/batchMod.pl > 2. I enter a barcode and submit the form > 3. I see all the item fields that I can use for doing the batch edit > > What's "input of deleted subfields are disabled" mean? Hie, thanks for testing this. >For example, in Tools > Batch item modification input of deleted subfields are disabled. I mean, in this form there is for each subfield : - a text input or select to change the value of this subfield - a checkbox to delete the subfield When checking the checkbox, the text input or select is set to disable (HTML attribute). So that it can't be edited and, but more important, it is not sent when form is submitted. This is important because the code looks to subfields to modify with those inputs. The bug is that with backgound job, inputs are sent event when they have de HTML attribut "disabled".
(In reply to Fridolin SOMERS from comment #4) > > What's "input of deleted subfields are disabled" mean? > > Hie, thanks for testing this. > > >For example, in Tools > Batch item modification input of deleted subfields are disabled. > I mean, in this form there is for each subfield : > - a text input or select to change the value of this subfield > - a checkbox to delete the subfield > When checking the checkbox, the text input or select is set to disable (HTML > attribute). So that it can't be edited and, but more important, it is not > sent when form is submitted. This is important because the code looks to > subfields to modify with those inputs. > > The bug is that with backgound job, inputs are sent event when they have de > HTML attribut "disabled". Ahhh, thanks for the clarification. I think I understand now. I'm swamped at the moment, but I'll try to test this when I can.
Created attachment 91065 [details] [review] 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>
Missing test plan... but I tested multiple batch operations and the change makes sense.
Created attachment 91396 [details] [review] 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>
Nice work! Pushed to master for 19.11.00
Pushed to 19.05.x for 19.05.03
backported to 18.11.x for 18.11.09