In serials receive and acquisition order creation from iso2709, the item edition form shows inputs that are missing "input_marceditor" class. They are also missing tabindex and id.
Created attachment 91187 [details] [review] Bug 23252: Add missing input_marceditor class in item editor In serials receive and acquisition order creation from iso2709, the item edition form shows inputs that are missing "input_marceditor" class. They are also missing tabindex and id. The side effect is that those inputs dont get the "noEnterSubmit" class so form is posted if a barcode scanner is used or if enter is used on keyboard. Test plan : 1) 1.1) Verify you have an item subfield linked to items.itemnotes, ie 952$z 1.2) Verify system preference "AcqCreateItem" is on "placing an order" 2) 2.2) Go to cataloguing module and edit an item 2.3) Verify that $z has an id, tabindex and "input_marceditor" class. 2.4) Verify that typing enter in $z does not submit the form 3) 3.1) Go to a serial with items creation, click on receive 3.2) Change status to "Arrived" 3.3) Verify that $z has an id, tabindex and "input_marceditor" class. 3.4) Verify that typing enter in $z does not submit the form 4) 4.1) Go to an acquisition basket 4.2) Click "Add to basket" and "From a staged file" 4.3) Click "Add orders" on a staged file 4.4) Go in tab "Item information" 4.5) Verify that $z has an id, tabindex and "input_marceditor" class.
(In reply to Fridolin SOMERS from comment #1) > The side effect is that those inputs dont get the "noEnterSubmit" class so > form is posted if a barcode scanner is used or if enter is used on keyboard. But will everyone appreciate that change ?
(In reply to Marcel de Rooy from comment #2) > (In reply to Fridolin SOMERS from comment #1) > > The side effect is that those inputs dont get the "noEnterSubmit" class so > > form is posted if a barcode scanner is used or if enter is used on keyboard. > > But will everyone appreciate that change ? This is the behavior for item edition in cataloging module. Having the same behavior in serials module is wanted I think.
I set major because it is difficult to correct serials once form is posted too early
Created attachment 92497 [details] [review] Bug 23252: Adds noEnterSubmit class in ajax context In cataloging.js $(document).ready adds noEnterSubmit class. This does not work in ajax context, it works with $(document).ajaxSuccess. Test plan : 1) 1.1) Verify you have an item subfield linked to items.itemnotes, ie 952$z 1.2) Verify 952$z exists in ACQ framework 2) 2.1) Verify system preference "AcqCreateItem" is on "placing an order" 2.2) Go to an acquisition basket 2.3) Click "Add to basket" and "From a new (empty) record" 2.4) Go to "Item" block 2.5) Verify that $z has "noEnterSubmit" class 2.6) Verify that typing enter in $z does not submit the form 3) 3.1) Change system preference "AcqCreateItem" to "receiving an order" 3.2) Go to "Receive shipment" 3.3) Receive an order 3.4) Go to "Item" block 3.5) Verify that $z has "noEnterSubmit" class 3.6) Verify that typing enter in $z does not submit the form
Created attachment 92630 [details] [review] Bug 23252: Add missing input_marceditor class in item editor In serials receive and acquisition order creation from iso2709, the item edition form shows inputs that are missing "input_marceditor" class. They are also missing tabindex and id. The side effect is that those inputs dont get the "noEnterSubmit" class so form is posted if a barcode scanner is used or if enter is used on keyboard. Test plan : 1) 1.1) Verify you have an item subfield linked to items.itemnotes, ie 952$z 1.2) Verify system preference "AcqCreateItem" is on "placing an order" 2) 2.2) Go to cataloguing module and edit an item 2.3) Verify that $z has an id, tabindex and "input_marceditor" class. 2.4) Verify that typing enter in $z does not submit the form 3) 3.1) Go to a serial with items creation, click on receive 3.2) Change status to "Arrived" 3.3) Verify that $z has an id, tabindex and "input_marceditor" class. 3.4) Verify that typing enter in $z does not submit the form 4) 4.1) Go to an acquisition basket 4.2) Click "Add to basket" and "From a staged file" 4.3) Click "Add orders" on a staged file 4.4) Go in tab "Item information" 4.5) Verify that $z has an id, tabindex and "input_marceditor" class. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 92631 [details] [review] Bug 23252: Adds noEnterSubmit class in ajax context In cataloging.js $(document).ready adds noEnterSubmit class. This does not work in ajax context, it works with $(document).ajaxSuccess. Test plan : 1) 1.1) Verify you have an item subfield linked to items.itemnotes, ie 952$z 1.2) Verify 952$z exists in ACQ framework 2) 2.1) Verify system preference "AcqCreateItem" is on "placing an order" 2.2) Go to an acquisition basket 2.3) Click "Add to basket" and "From a new (empty) record" 2.4) Go to "Item" block 2.5) Verify that $z has "noEnterSubmit" class 2.6) Verify that typing enter in $z does not submit the form 3) 3.1) Change system preference "AcqCreateItem" to "receiving an order" 3.2) Go to "Receive shipment" 3.3) Receive an order 3.4) Go to "Item" block 3.5) Verify that $z has "noEnterSubmit" class 3.6) Verify that typing enter in $z does not submit the form Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 93050 [details] [review] Bug 23252: Add missing input_marceditor class in item editor In serials receive and acquisition order creation from iso2709, the item edition form shows inputs that are missing "input_marceditor" class. They are also missing tabindex and id. The side effect is that those inputs dont get the "noEnterSubmit" class so form is posted if a barcode scanner is used or if enter is used on keyboard. Test plan : 1) 1.1) Verify you have an item subfield linked to items.itemnotes, ie 952$z 1.2) Verify system preference "AcqCreateItem" is on "placing an order" 2) 2.2) Go to cataloguing module and edit an item 2.3) Verify that $z has an id, tabindex and "input_marceditor" class. 2.4) Verify that typing enter in $z does not submit the form 3) 3.1) Go to a serial with items creation, click on receive 3.2) Change status to "Arrived" 3.3) Verify that $z has an id, tabindex and "input_marceditor" class. 3.4) Verify that typing enter in $z does not submit the form 4) 4.1) Go to an acquisition basket 4.2) Click "Add to basket" and "From a staged file" 4.3) Click "Add orders" on a staged file 4.4) Go in tab "Item information" 4.5) Verify that $z has an id, tabindex and "input_marceditor" class. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Created attachment 93051 [details] [review] Bug 23252: Adds noEnterSubmit class in ajax context In cataloging.js $(document).ready adds noEnterSubmit class. This does not work in ajax context, it works with $(document).ajaxSuccess. Test plan : 1) 1.1) Verify you have an item subfield linked to items.itemnotes, ie 952$z 1.2) Verify 952$z exists in ACQ framework 2) 2.1) Verify system preference "AcqCreateItem" is on "placing an order" 2.2) Go to an acquisition basket 2.3) Click "Add to basket" and "From a new (empty) record" 2.4) Go to "Item" block 2.5) Verify that $z has "noEnterSubmit" class 2.6) Verify that typing enter in $z does not submit the form 3) 3.1) Change system preference "AcqCreateItem" to "receiving an order" 3.2) Go to "Receive shipment" 3.3) Receive an order 3.4) Go to "Item" block 3.5) Verify that $z has "noEnterSubmit" class 3.6) Verify that typing enter in $z does not submit the form Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
$(document).ready(function() { $("input.input_marceditor, input.indicator").addClass('noEnterSubmit'); + $(document).ajaxSuccess(function() { + $("input.input_marceditor, input.indicator").addClass('noEnterSubmit'); + }); }); Christophe: I am having the impression that only orderreceive needs this. In the context of cataloging.js and its broader use, it seems to me that adding it closer to the needed location would be better? Please confirm.
(In reply to Marcel de Rooy from comment #10) > $(document).ready(function() { > $("input.input_marceditor, input.indicator").addClass('noEnterSubmit'); > + $(document).ajaxSuccess(function() { > + $("input.input_marceditor, > input.indicator").addClass('noEnterSubmit'); > + }); > }); > > Christophe: I am having the impression that only orderreceive needs this. In > the context of cataloging.js and its broader use, it seems to me that adding > it closer to the needed location would be better? Please confirm. Actually indeed, but for me having all in cataloging.js is better. Imagine we change the name of the class "input_marceditor". Or if we change serials receive to use Ajax. Thanks a lot for your time :)
It looks like this is actually a regressen - we fixed it before in bug 8557.
This looks solid to me, I've noted Marcelr's comment but believe we're safe here given the responses and a look at the code myself.. Passing QA
Nice work! Pushed to master for 19.11.00
Pushed to 19.05.x for 19.05.05