Bug 36701 - Adjust hold confirmation to avoid showing empty div
Summary: Adjust hold confirmation to avoid showing empty div
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Emily Lamancusa (emlam)
QA Contact: Testopia
URL:
Keywords:
Depends on: 33174
Blocks:
  Show dependency treegraph
 
Reported: 2024-04-25 18:57 UTC by Emily Lamancusa (emlam)
Modified: 2024-07-05 20:18 UTC (History)
3 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:
24.05.00
Circulation function:


Attachments
Bug 36701: Adjust confirmation to hide empty div (2.50 KB, patch)
2024-04-25 19:03 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review
Bug 36701: Adjust confirmation to hide empty div (2.50 KB, patch)
2024-04-25 19:25 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review
Bug 36701: Adjust confirmation to hide empty div (2.56 KB, patch)
2024-04-25 20:04 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Emily Lamancusa (emlam) 2024-04-25 18:57:48 UTC
Bug 33174 added a warning when cancelling multiple holds from request.pl, clearly indicating how many holds would be cancelled. The added div is empty when directly cancelling a single hold (by clicking the FA trash can icon next to it), so it makes sense to hide it in that case.
Comment 1 Emily Lamancusa (emlam) 2024-04-25 19:03:00 UTC
Created attachment 165580 [details] [review]
Bug 36701: Adjust confirmation to hide empty div

To test:
1. Place a hold on any bib record
2. Cancel the hold by clicking the trash can icon next to it
--> Note that there is an empty red page section in the modal
3. Apply patch and refresh the page
4. Repeat steps 1-2
--> No empty red page section
5. Confirm that the test plan from bug 33174 still works
Comment 2 Lucas Gass (lukeg) 2024-04-25 19:07:47 UTC
Thanks Emily! Previous experience has told me that the hidden attribute doesn't always work well with jQuery's show() and hide() methods. 

I think it might be better to use style="display:none;" here. What do you think?
Comment 3 Emily Lamancusa (emlam) 2024-04-25 19:24:12 UTC
Thanks for the tip, Lucas! That's good to know. I'll amend my patch.
Comment 4 Emily Lamancusa (emlam) 2024-04-25 19:25:28 UTC
Created attachment 165583 [details] [review]
Bug 36701: Adjust confirmation to hide empty div

To test:
1. Place a hold on any bib record
2. Cancel the hold by clicking the trash can icon next to it
--> Note that there is an empty red page section in the modal
3. Apply patch and refresh the page
4. Repeat steps 1-2
--> No empty red page section
5. Confirm that the test plan from bug 33174 still works
Comment 5 Lucas Gass (lukeg) 2024-04-25 20:04:09 UTC
Created attachment 165588 [details] [review]
Bug 36701: Adjust confirmation to hide empty div

To test:
1. Place a hold on any bib record
2. Cancel the hold by clicking the trash can icon next to it
--> Note that there is an empty red page section in the modal
3. Apply patch and refresh the page
4. Repeat steps 1-2
--> No empty red page section
5. Confirm that the test plan from bug 33174 still works

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 6 Lucas Gass (lukeg) 2024-04-25 20:05:23 UTC
This looks good, fixes an obvious problem, QA scripts are happy. I feel good marking this one straight to PQA.
Comment 7 Emily Lamancusa (emlam) 2024-05-08 13:42:31 UTC
Thanks, Lucas! Did you mean to set this to PQA? (it's still at Signed Off)
Comment 8 Lucas Gass (lukeg) 2024-05-08 14:06:55 UTC
(In reply to Emily Lamancusa from comment #7)
> Thanks, Lucas! Did you mean to set this to PQA? (it's still at Signed Off)

Thanks Emily, I did mean to set that to PQA. :)
Comment 9 Katrin Fischer 2024-05-08 16:25:17 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 10 Fridolin Somers 2024-05-24 15:00:08 UTC
Depends on Bug 33174 not in 23.11.x
Comment 11 Caroline Cyr La Rose 2024-07-05 20:18:51 UTC
Bug fix, nothing to add/edit in the Koha manual.