Bugzilla – Attachment 161967 Details for
Bug 23415
Notify patron fines when renewing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23415: Display confirm dialog only once
0004-Bug-23415-Display-confirm-dialog-only-once.patch (text/plain), 2.69 KB, created by
Emmi Takkinen
on 2024-02-09 12:21:55 UTC
(
hide
)
Description:
Bug 23415: Display confirm dialog only once
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2024-02-09 12:21:55 UTC
Size:
2.69 KB
patch
obsolete
>From 47d2928c716f0e8909939438e13388777f838ef8 Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@outlook.com> >Date: Mon, 15 Jun 2020 13:19:35 +0300 >Subject: [PATCH 4/6] Bug 23415: Display confirm dialog only once > >On detail page when patron has multiple checkouts and they are renewed >from checkouts list, confirmation dialog box is displayed as many times >as patron has checkouts. This patch reworks some code so this dialog box is >displayed only once. > >To test: >1. Find patron with multiple checkouts (at least two) >2. Renew all checkouts from checkout list >3. Confirmation pop-up is displayed for every checkout >4. Apply this patch >5. Renew again >=> Confirmation dialog box is displayed only once > >Sponsored-by: Koha-Suomi Oy > >Signed-off-by: Stina Hallin <stina.hallin@ub.lu.se> >Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> >--- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 20 +++++++++----------- > 1 file changed, 9 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index 37562994de..33d1d48951 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -472,6 +472,8 @@ $(document).ready(function() { > > var onHoldDueDateSet = false; > >+ var show_confirm = true; >+ > var onHoldChecked = function() { > var isChecked = false; > $('input[data-on-reserve]').each(function() { >@@ -641,15 +643,13 @@ $(document).ready(function() { > > var itemnumber = $(this).val(); > >- var can_renew = true; >- >- if( parseFloat(fines) > parseFloat(amountlimit) ) { >+ if(show_confirm && parseFloat(fines) > parseFloat(amountlimit) ) { > var result = confirm(MSG_CONFRIM_RENEW); >- if(result){ >- can_renew = true; >- }else{ >- can_renew = false; >+ if(!result){ >+ return false; > } >+ // Prevent displaying confirm box again >+ show_confirm = false; > } > > var params = { >@@ -714,10 +714,8 @@ $(document).ready(function() { > async: false, > }); > >- if(can_renew) { >- $(this).parent().parent().replaceWith("<img id='renew_" + itemnumber + "' src='" + interface + "/" + theme + "/img/spinner-small.gif' />"); >- renew(params); >- } >+ $(this).parent().parent().replaceWith("<img id='renew_" + itemnumber + "' src='" + interface + "/" + theme + "/img/spinner-small.gif' />"); >+ renew(params); > }); > > // Refocus on barcode field if it exists >-- >2.34.1 >
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 23415
:
92039
|
92541
|
98442
|
98634
|
98996
|
98997
|
105893
|
105894
|
108392
|
109871
|
109872
|
109876
|
109880
|
116919
|
116920
|
116921
|
116922
|
118175
|
118176
|
118177
|
118178
|
118183
|
119300
|
119301
|
119302
|
119303
|
121472
|
139670
|
139671
|
139672
|
139673
|
139674
|
146415
|
148198
|
148199
|
148200
|
148201
|
148202
|
152776
|
152777
|
152778
|
152779
|
152780
|
152781
|
154595
|
154596
|
154597
|
154598
|
154599
|
154600
|
158302
|
158303
|
158304
|
158305
|
158306
|
158307
|
161964
|
161965
|
161966
|
161967
|
161968
|
161969
|
162171
|
162172
|
162173
|
162174
|
162175
|
162176
|
162177
|
162178
|
162179
|
162180
|
171620
|
171621
|
171622
|
171623
|
171983
|
171984
|
171985
|
171986
|
172906
|
172907
|
172908
|
172909
|
172910