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
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
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.
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.
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>
Note from testing: To enable Tag control enable the TagsInputOnList system preference.
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>
Nice work everyone! Pushed to master for 20.05
not needed in 19.11.x branch as https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14715 was not backported.