Bug 18707 - Background jobs post disabled inputs
Summary: Background jobs post disabled inputs
Status: ASSIGNED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Fridolin SOMERS
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 18710
  Show dependency treegraph
 
Reported: 2017-05-31 14:23 UTC by Fridolin SOMERS
Modified: 2017-05-31 15:04 UTC (History)
0 users

See Also:
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:


Attachments
Bug 18707 - Background jobs post disabled inputs (1.47 KB, patch)
2017-05-31 14:30 UTC, Fridolin SOMERS
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 ?