Bug 33233

Summary: OPAC advanced search inputs stay disabled when using browser's back button
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: OPACAssignee: Lucas Gass (lukeg) <lucas>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: normal    
Priority: P5 - low CC: barbara.johnson, bwsdonna, danyonsewell
Version: Main   
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:
23.05.00,22.11.06,22.05.14,21.11.22
Circulation function:
Bug Depends on:    
Bug Blocks: 34857    
Attachments: Bug 33233: Don't allow disabled attribute to remain when using browser's back button
Bug 33233: Don't allow disabled attribute to remain when using browser's back button
Bug 33233: Don't allow disabled attribute to remain when using browser's back button

Description Lucas Gass (lukeg) 2023-03-15 12:57:21 UTC
From a comment in Bug 7607:

On the OPAC when you click the back button the fields are not enabled - on the staff side they are,
I leave this problem for someone else to solve



We should solve this now.
Comment 1 Donna 2023-03-16 13:00:54 UTC
This is really confusing for staff and patrons!  I know the preferred behavior is to click the link to Return to last advanced search, but that is not a floating link, so unless you are at the top of the page, you don't see it.

Typical use by a patron/staff is to do the search, scroll down the first page of results, and if the search is not on target, hit the back arrow and refine the search.

The specifics of the search should be retained, but the user needs the ability to add additional fields etc.
Comment 2 Lucas Gass (lukeg) 2023-03-16 20:52:54 UTC
There seems to be a pretty large variation here depending on what browser is being used. 

Maybe it would be better to deal with these empty values at the script level, instead of in the templates?
Comment 3 Lucas Gass (lukeg) 2023-04-11 20:44:36 UTC
Created attachment 149476 [details] [review]
Bug 33233: Don't allow disabled attribute to remain when using browser's back button

To test:
1. Go to OPAC advanced search and do a search using only one of the inputs.
2. Once the search is complete use the browser's back button to return to the advanced search.
3. Notice the unused inputs are disabled.
4. Apply patch and try again. Now the inputs should not be disabled.
Comment 4 ByWater Sandboxes 2023-04-14 17:38:58 UTC
Created attachment 149701 [details] [review]
Bug 33233: Don't allow disabled attribute to remain when using browser's back button

To test:
1. Go to OPAC advanced search and do a search using only one of the inputs.
2. Once the search is complete use the browser's back button to return to the advanced search.
3. Notice the unused inputs are disabled.
4. Apply patch and try again. Now the inputs should not be disabled.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 5 Barbara Johnson 2023-04-14 17:39:37 UTC
This worked great - so glad to see this fixed.
Comment 6 Katrin Fischer 2023-04-23 21:57:53 UTC
Created attachment 150141 [details] [review]
Bug 33233: Don't allow disabled attribute to remain when using browser's back button

To test:
1. Go to OPAC advanced search and do a search using only one of the inputs.
2. Once the search is complete use the browser's back button to return to the advanced search.
3. Notice the unused inputs are disabled.
4. Apply patch and try again. Now the inputs should not be disabled.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Tomás Cohen Arazi (tcohen) 2023-05-05 18:43:11 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 8 Martin Renvoize (ashimema) 2023-05-12 15:36:29 UTC
Many hands makes light work, thankyou everyone!

Pushed to 22.11.x for the next release
Comment 9 Lucas Gass (lukeg) 2023-06-15 14:48:26 UTC
Backported to 22.05.x for upcoming 22.05.14
Comment 10 Danyon Sewell 2023-07-24 23:46:42 UTC
Backported to 21.11.x for upcoming 21.11.22