Bug 20221 - Fix for JavaScript error during checkout patron search
Summary: Fix for JavaScript error during checkout patron search
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 19641
Blocks:
  Show dependency treegraph
 
Reported: 2018-02-15 19:42 UTC by Owen Leonard
Modified: 2018-06-04 20:15 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 20221 - Fix for JavaScript error during checkout patron search (4.59 KB, patch)
2018-02-15 19:55 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2018-02-15 19:42:00 UTC
If you submit a patron name to the checkout form it will trigger a JavaScript error in the console because there is JS embedded in an include, circ-patron-search-results.inc. This JS should be moved so that it is included in the footer.
Comment 1 Owen Leonard 2018-02-15 19:55:30 UTC
Created attachment 71694 [details] [review]
Bug 20221 - Fix for JavaScript error during checkout patron search

This patch fixes a bug caused by the changes in Bug 19641. JavaScript
embedded in circ-patron-search-results.inc executes before jQuery is
loaded.

This patch adds a separate javascript file which can be included both in
circulation.tt and request.tt since both use the same include.

To test, apply the patch and submit a patron name in the check out form.
On the page of search results, clicking a table row should work the same
as clicking the patron name link.

Perform the same test during the hold process: Locate and place a hold
on a title. In the patron search form, submit a patron name and test the
behavior of the search results screen.
Comment 2 Jonathan Druart 2018-02-16 16:02:34 UTC
Pushed to master, thanks Owen!