To recreate: 1. Have a record with many holds 2. From request.pl select all the holds and press Cancel seleected(x) 3. A modal popup now appears that says "Are you sure you want to cancel this hold?" 4. It would be nice if this modal more clearly indicated that you are about to cancel many holds.
Created attachment 147985 [details] [review] Bug 33174: Add warning about how many holds are being cancelled To test: 1. Apply patch 2. Find or make a record with many holds on it. 3. Go to the Holds tab ( request.pl ). 4. Select some hodls to cancel and press "Cancel selected" 5. A modal popup will appear. Notice the warning telling you exactly how many holds you are about to cancel. Confirm the count is accurate. 6. Try using the select all button and make sure the warning is accurate. 7. Make sure you can cancel the holds.
Created attachment 147989 [details] [review] Bug 33174: Add warning about how many holds are being cancelled To test: 1. Apply patch 2. Find or make a record with many holds on it. 3. Go to the Holds tab ( request.pl ). 4. Select some hodls to cancel and press "Cancel selected" 5. A modal popup will appear. Notice the warning telling you exactly how many holds you are about to cancel. Confirm the count is accurate. 6. Try using the select all button and make sure the warning is accurate. 7. Make sure you can cancel the holds. 7. Make sure you can cancel the holds. 7. Make sure you can cancel the holds. 7. Make sure you can cancel the holds. 7. Make sure you can cancel the holds. 7. Make sure you can cancel the holds. 7. Make sure you can cancel the holds. Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Works as described, thanks for the patch.
I like this, but I am not sure if we couldn't do a little better accounting for singular/plural forms and translations here. At the moment we have: ---------- Are you sure you want to cancel this hold? This action will cancel <span class='badge'>%s</span> hold(s) ---------- I wonder if we could use something like below with JavaScript too? https://wiki.koha-community.org/wiki/Internationalization,_plural_forms,_context,_and_more_RFC [% tnpx('bibliographic record', 'there is {count} item', 'there are {count} items', items.count, { count = items.count }) %] Failed for feedback.
Cait, The biggest problem I am encountering here is that we do not retrieve the count for # of holds one is about to cancel until we 'cancel_selected_holds'. So if we can use tnpx() in this capacity I am not sure how it will be implemented. Any advice is appreciated.
Created attachment 162968 [details] [review] Bug 33174: Add warning about how many holds are being cancelled To test: 1. Apply patch 2. Find or make a record with many holds on it. 3. Go to the Holds tab ( request.pl ). 4. Select some hodls to cancel and press "Cancel selected" 5. A modal popup will appear. Notice the warning telling you exactly how many holds you are about to cancel. Confirm the count is accurate. 6. Try using the select all button and make sure the warning is accurate. 7. Make sure you can cancel the holds. Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed for 24.05! Well done everyone, thank you!
Not backported to 23.11.x
This is not working correctly, see bug 37817.