Bug 23252: Adds noEnterSubmit class in ajax context
authorChristophe Croullebois <christophe.croullebois@biblibre.com>
Thu, 29 Aug 2019 13:23:01 +0000 (15:23 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 8 Nov 2019 14:00:01 +0000 (15:00 +0100)
commit2f4d2d7e3b78a19cab4a7b8360f1c62e8deff63c
tree0096d71d5f16d400768e2a7ed414d55e32cf1d22
parentff77bb2e8303779208eb2cd34e51d9154b7aa0d4
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>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c66cebf744778dbfc15597079549c161a7836d63)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/js/cataloging.js