Bug 36701 - Adjust hold confirmation to avoid showing empty div
Summary: Adjust hold confirmation to avoid showing empty div
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Emily Lamancusa
QA Contact: Testopia
URL:
Keywords:
Depends on: 33174
Blocks:
  Show dependency treegraph
 
Reported: 2024-04-25 18:57 UTC by Emily Lamancusa
Modified: 2024-04-25 20:05 UTC (History)
1 user (show)

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


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

Note You need to log in before you can comment on or make changes to this bug.
Description Emily Lamancusa 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 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 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 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 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 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 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.