Bug 39141

Summary: Add search box to checkout page
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: CirculationAssignee: Nick Clemens (kidclamp) <nick>
Status: Pushed to main --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: enhancement    
Priority: P5 - low CC: baptiste.wojtkowski, barbara.johnson, gmcharlt, kyle.m.hall, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Small patch Documentation contact:
Documentation submission: Text to go in the release notes:
When visiting the checkouts page without having selected a patron, the page was empty. Now it shows a patron search box to help in selecting the patron.
Version(s) released in:
25.05.00
Circulation function:
Attachments: Bug 39141: Add a patron search box on Circulation - Checkout
Bug 39141: (follow-up) Style input and add autocomplete
Bug 39141: Add a patron search box on Circulation - Checkout
Bug 39141: (follow-up) Style input and add autocomplete
Bug 39141: Add a patron search box on Circulation - Checkout
Bug 39141: (follow-up) Style input and add autocomplete

Description Nick Clemens (kidclamp) 2025-02-14 12:57:20 UTC
From Koha home click 'Circulation' then 'Check out'
You are on a page with a header search, but no content, this can be odd

For contrast:
'Circulation' -> 'Check in'

You have a form in the page to return items
Comment 1 Nick Clemens (kidclamp) 2025-02-14 12:59:41 UTC
Created attachment 178092 [details] [review]
Bug 39141: Add a patron search box on Circulation - Checkout

This patch adds a search box when visiting the check out page before a patron has been
selected

To test:
1 - From Koha home browse to Circulation -> Check out
2 - Note an empty page, though you have the header search forms
3 - Apply patch
4 - Repeate above - now you have a patron search box
5 - Search by name or cardnumber
6 - Confirm search works as expected
7 - Sign off!
Comment 2 Owen Leonard 2025-02-14 14:24:59 UTC
Created attachment 178095 [details] [review]
Bug 39141: (follow-up) Style input and add autocomplete

This patch adds some friendly styling to the new form and adds
autocomplete functionality.
Comment 3 ByWater Sandboxes 2025-02-14 21:01:40 UTC
Created attachment 178121 [details] [review]
Bug 39141: Add a patron search box on Circulation - Checkout

This patch adds a search box when visiting the check out page before a patron has been
selected

To test:
1 - From Koha home browse to Circulation -> Check out
2 - Note an empty page, though you have the header search forms
3 - Apply patch
4 - Repeate above - now you have a patron search box
5 - Search by name or cardnumber
6 - Confirm search works as expected
7 - Sign off!

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 4 ByWater Sandboxes 2025-02-14 21:01:42 UTC
Created attachment 178122 [details] [review]
Bug 39141: (follow-up) Style input and add autocomplete

This patch adds some friendly styling to the new form and adds
autocomplete functionality.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 5 Marcel de Rooy 2025-02-21 08:36:51 UTC
Why not use patron-search-box.inc ? And its permissions check?

Also note that it includes an id="findborrower".
Why do you change to findborrower_main:
-                <input autocomplete="off" id="findborrower" name="findborrower" type="text" placeholder="Enter patron card number or partial name" size="40" />
+                <input autocomplete="off" id="findborrower_main" name="findborrower" type="text" placeholder="Enter patron card number or partial name" size="40" />

Needs feedback
Comment 6 Owen Leonard 2025-02-21 17:19:17 UTC
(In reply to Marcel de Rooy from comment #5)
> Why not use patron-search-box.inc ? And its permissions check?

The markup in patron-search-box.inc is specific to the header search tabs and cannot be easily reused here.
Comment 7 Baptiste Wojtkowski (bwoj) 2025-02-27 13:50:11 UTC
Shouldn't we try and reuse the tool used in reserve/request.pl ? It might be improved in a separate patch later if you don't want to now ; this works and is a good increment. 

At the moment please reuse the styles used in "check in" for the barcode.
Comment 8 Marcel de Rooy 2025-03-14 10:24:51 UTC
Adjusted the title that referred to Check in
Comment 9 Marcel de Rooy 2025-03-14 10:26:19 UTC
Created attachment 179318 [details] [review]
Bug 39141: Add a patron search box on Circulation - Checkout

This patch adds a search box when visiting the check out page before a patron has been
selected

To test:
1 - From Koha home browse to Circulation -> Check out
2 - Note an empty page, though you have the header search forms
3 - Apply patch
4 - Repeate above - now you have a patron search box
5 - Search by name or cardnumber
6 - Confirm search works as expected
7 - Sign off!

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Marcel de Rooy 2025-03-14 10:26:21 UTC
Created attachment 179319 [details] [review]
Bug 39141: (follow-up) Style input and add autocomplete

This patch adds some friendly styling to the new form and adds
autocomplete functionality.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 11 Marcel de Rooy 2025-03-14 10:27:09 UTC
(In reply to Baptiste Wojtkowski (bwoj) from comment #7)
> Shouldn't we try and reuse the tool used in reserve/request.pl ? It might be
> improved in a separate patch later if you don't want to now ; this works and
> is a good increment. 
> 
> At the moment please reuse the styles used in "check in" for the barcode.

Lets do further improvements on follow-up reports.
Comment 12 Katrin Fischer 2025-03-17 07:00:54 UTC
As this has been like this forever, I feel it qualifies more as an enhancement.
Comment 13 Katrin Fischer 2025-03-17 07:05:20 UTC
I made the page heading "Check out" to match the name on the Circulation page and also consistent with "Check in".
Comment 14 Katrin Fischer 2025-03-17 07:28:23 UTC
Pushed for 25.05!

Well done everyone, thank you!