Bug 18707

Summary: Background jobs post disabled inputs
Product: Koha Reporter: Fridolin SOMERS <fridolin.somers>
Component: ToolsAssignee: Fridolin SOMERS <fridolin.somers>
Status: ASSIGNED --- QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low    
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18706
Whiteboard:
Change sponsored?: --- Patch complexity: Trivial patch
Bot Control: --- When did the bot last check this:
Who signed the patch off: Text to go in the release notes:
Bug Depends on:    
Bug Blocks: 18710    
Attachments: Bug 18707 - Background jobs post disabled inputs

Description Fridolin SOMERS 2017-05-31 14:23:54 UTC
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() {
...
Comment 1 Fridolin SOMERS 2017-05-31 14:30:01 UTC
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>
Comment 2 Fridolin SOMERS 2017-05-31 14:33:55 UTC
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 ?