Bugzilla – Attachment 147989 Details for
Bug 33174
Have better indication when one is cancelling multiple holds on a record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33174: Add warning about how many holds are being cancelled
Bug-33174-Add-warning-about-how-many-holds-are-bei.patch (text/plain), 3.84 KB, created by
ByWater Sandboxes
on 2023-03-09 09:42:41 UTC
(
hide
)
Description:
Bug 33174: Add warning about how many holds are being cancelled
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2023-03-09 09:42:41 UTC
Size:
3.84 KB
patch
obsolete
>From ae65be27e2939b7c39f83a85e595d2c4eec26ed4 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 8 Mar 2023 21:12:39 +0000 >Subject: [PATCH] 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> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index e2d33c5415..5b77443b7e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -1084,7 +1084,7 @@ > <input type="submit" class="btn btn-primary" name="submit" value="Update hold(s)" /> > </div> > <div class="btn-group"> >- <button class="cancel_selected_holds" data-bulk="true"></button> >+ <button class="btn cancel_selected_holds" data-bulk="true"></button> > </div> > <fieldset id="cancellation-reason-fieldset" class="action" style="display:none"> > [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] >@@ -1273,7 +1273,7 @@ > > <div class="modal-body"> > <p>Are you sure you want to cancel this hold?</p> >- >+ <div id="cancel_hold_alert" class="alert alert-danger"></div> > <fieldset class="action"> > [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] > [% IF hold_cancellation.count %] >@@ -1336,6 +1336,7 @@ > } > > var MSG_CANCEL_SELECTED = _("Cancel selected (%s)"); >+ var MSG_CANCEL_ALERT = _("This action will cancel <span class='badge'>%s</span> hold(s)."); > $.fn.select2.defaults.set("width", "100%" ); > $.fn.select2.defaults.set("dropdownAutoWidth", true ); > >@@ -1716,6 +1717,7 @@ > $('.select_hold', table).prop('checked', !count); > $(this).prop('checked', !count); > $('.cancel_selected_holds').html(MSG_CANCEL_SELECTED.format($('.holds_table .select_hold:checked').length)); >+ $('#cancel_hold_alert').html( MSG_CANCEL_ALERT.format($('.holds_table .select_hold:checked').length)); > localStorage.selectedHolds = $('.holds_table .select_hold:checked').toArray().map(el => $(el).data('id')); > }); > >@@ -1724,6 +1726,7 @@ > var count = $('.select_hold:not(:checked)', table).length; > $('.select_hold_all', table).prop('checked', !count); > $('.cancel_selected_holds').html(MSG_CANCEL_SELECTED.format($('.holds_table .select_hold:checked').length)); >+ $('#cancel_hold_alert').html( MSG_CANCEL_ALERT.format($('.holds_table .select_hold:checked').length)); > localStorage.selectedHolds = $('.holds_table .select_hold:checked').toArray().map(el => $(el).data('id')); > }); > >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33174
:
147985
|
147989
|
162968