Bug 23575: Template error causes item search to be submitted multiple times
commit075261645e1650629038c9a09e8d9e387bcc5474
authorOwen Leonard <oleonard@myacpl.org>
Mon, 9 Sep 2019 16:58:04 +0000 (9 16:58 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 17 Sep 2019 11:39:47 +0000 (17 12:39 +0100)
tree953517a3783f2d83ca93e515c7f4ede8f5899c34
parent766814ffa3c4592b9b7dcde83873ef12e796ae68
Bug 23575: Template error causes item search to be submitted multiple times

This patch corrects the item search template so that the submit handler
is not nested inside an unrelated loop. The change should have no
outward effect on the behavior of the item search other than making it
faster.

To observe the bug in action, open your browser's developer tools and
click the "Network" tab. Filter the output to only "XHR" and perform an
item search. You should see multiple requests.

To test, apply the patch and perform an item search. It should behave
normally.

Check the browser's "Network" monitor again to verify that only one
request is being sent.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt