Bug 25004 - Search results place hold button not enabled when checking result checkboxes on opac-search.pl
Summary: Search results place hold button not enabled when checking result checkboxes ...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-27 15:27 UTC by Nick Clemens (kidclamp)
Modified: 2020-11-30 21:49 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00
Circulation function:


Attachments
Bug 25004: Fix selector for checkboxes on results page (1.53 KB, patch)
2020-03-27 15:32 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 25004: Search results place hold button not enabled when checking result checkboxes on opac-search.pl (1.53 KB, patch)
2020-03-31 15:03 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 25004: Search results place hold button not enabled when checking result checkboxes on opac-search.pl (1.58 KB, patch)
2020-04-01 08:44 UTC, David Nind
Details | Diff | Splinter Review
Bug 25004: Search results place hold button not enabled when checking result checkboxes on opac-search.pl (1.64 KB, patch)
2020-04-01 10:16 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 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 (kidclamp) 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 (kidclamp) 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 (ashimema) 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.