Bug 25004

Summary: Search results place hold button not enabled when checking result checkboxes on opac-search.pl
Product: Koha Reporter: Nick Clemens <nick>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: 1joynelson, david
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00
Attachments: Bug 25004: Fix selector for checkboxes on results page
Bug 25004: Search results place hold button not enabled when checking result checkboxes on opac-search.pl
Bug 25004: Search results place hold button not enabled when checking result checkboxes on opac-search.pl
Bug 25004: Search results place hold button not enabled when checking result checkboxes on opac-search.pl

Description Nick Clemens 2020-03-27 15:27:28 UTC
To recreate:
0 - Make sure ability to place holds on OPAC is enabled (RequestOnOpac)
1 - Search on the opac to get multipel results
2 - Note place hold button is disabled
3 - Check a box next to a result
4 - Note place hold button not enabled
Comment 1 Nick Clemens 2020-03-27 15:32:43 UTC
Created attachment 102008 [details] [review]
Bug 25004: Fix selector for checkboxes on results page

To recreate:
0 - Make sure ability to place holds on OPAC is enabled (RequestOnOpac)
1 - Search on the opac to get multipel results
2 - Note place hold button is disabled
3 - Check a box next to a result
4 - Note place hold button not enabled
5 - Apply patch
6 - Do a new search
7 - Check a checkbox
8 - Note the 'PLace hold' button is enabled
9 - Sign off! Do a happy dance! Hugs
Comment 2 Owen Leonard 2020-03-27 15:54:05 UTC
git bisect points to the cause of the bug and to the solution:

Bug 14715, "Results per page dropdown for catalogue search" adds an extra closing </div> tag which I'm assuming breaks the selector for the checkbox because the DOM context is changed.

Removing the </div> at line 188 of opac-results.tt fixes the problem for me.
Comment 3 Owen Leonard 2020-03-31 15:03:11 UTC
Created attachment 102145 [details] [review]
Bug 25004: Search results place hold button not enabled when checking result checkboxes on opac-search.pl

This patch makes a minor correction to the markup of the OPAC search
results page so that the event handlers attached to the checkboxes work
correctly. The broken markup broke the jQuery selector used to control
the event.

An extra </div> was added by mistake by Bug 14715.

To test, apply the patch and test the process of selecting multiple
titles by checking the checkbox. Doing so should activate the "Place
hold" and "Tag" controls.
Comment 4 David Nind 2020-04-01 08:44:30 UTC
Created attachment 102176 [details] [review]
Bug 25004: Search results place hold button not enabled when checking result checkboxes on opac-search.pl

This patch makes a minor correction to the markup of the OPAC search
results page so that the event handlers attached to the checkboxes work
correctly. The broken markup broke the jQuery selector used to control
the event.

An extra </div> was added by mistake by Bug 14715.

To test, apply the patch and test the process of selecting multiple
titles by checking the checkbox. Doing so should activate the "Place
hold" and "Tag" controls.

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2020-04-01 08:45:52 UTC
Note from testing: To enable Tag control enable the TagsInputOnList system preference.
Comment 6 Nick Clemens 2020-04-01 10:16:17 UTC
Created attachment 102212 [details] [review]
Bug 25004: Search results place hold button not enabled when checking result checkboxes on opac-search.pl

This patch makes a minor correction to the markup of the OPAC search
results page so that the event handlers attached to the checkboxes work
correctly. The broken markup broke the jQuery selector used to control
the event.

An extra </div> was added by mistake by Bug 14715.

To test, apply the patch and test the process of selecting multiple
titles by checking the checkbox. Doing so should activate the "Place
hold" and "Tag" controls.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 7 Martin Renvoize 2020-04-03 13:24:25 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 8 Joy Nelson 2020-04-28 21:32:25 UTC
not needed in 19.11.x branch as https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14715 was not backported.