Bugzilla – Attachment 189490 Details for
Bug 19814
Batch Check-in function
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19814: More template changes
Bug-19814-More-template-changes.patch (text/plain), 9.54 KB, created by
Marcel de Rooy
on 2025-11-11 14:49:29 UTC
(
hide
)
Description:
Bug 19814: More template changes
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-11-11 14:49:29 UTC
Size:
9.54 KB
patch
obsolete
>From e803a8c8decb2aba72f876470172d90979f341bd Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 10 Nov 2025 11:46:02 +0100 >Subject: [PATCH] Bug 19814: More template changes >Content-Type: text/plain; charset=utf-8 > >Add more AddReturn codes to result loop (like ResFound, BadBarcode etc). >Add a class to NotIssued to optionally hide. >Open circ settings, enable batch mode when pref enabled. >Add additional batch mode settings. >Toggle display of additional batch mode settings. >Load/save batch mode settings from localStorage. >--- > .../prog/en/modules/circ/returns.tt | 82 ++++++++++++++++++- > 1 file changed, 80 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >index 63d374eb18..8ccf53e608 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -1274,6 +1274,20 @@ > <div id="batch-mode-setting" class="circ-setting"> > <input type="checkbox" id="batch-mode-toggle" name="batch_mode" value="batch_mode" /> > <label for="batch-mode-toggle">Enable batch mode for multiple returns</label> >+ >+ <div id="batch-mode-more-settings" class="" style="margin-left:50px;"> >+ <input type="checkbox" id="batch-mode-keep-selection" name="keep_selection" value="keep_selection" /> >+ <label for="batch-mode-toggle">Remember batch mode settings</label> >+ <br/> >+ <input type="checkbox" id="batch-mode-ignore-notissued" name="ignore_notissued" value="ignore_notissued" /> >+ <label for="batch-mode-toggle">Hide 'not checked out'-warnings</label> >+ <br/> >+ <input type="checkbox" id="batch-mode-confirm-hold" name="confirm_hold" value="confirm_hold" /> >+ <label for="batch-mode-toggle">Confirm hold when found</label> >+ <br/> >+ <input type="checkbox" id="batch-mode-confirm-transfer" name="confirm_transfer" value="confirm_transfer" /> >+ <label for="batch-mode-toggle">Confirm transfer when found</label> >+ </div> > </div> > > [% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %] >@@ -1343,14 +1357,37 @@ > <div class="alert alert-info">Item transferred to [% result.messages.TransferTo %]</div> > [% ELSIF code == 'NeedsTransfer' %] > <div class="alert alert-warning">Item needs transfer</div> >+ [% ELSIF code == 'RecallNeedsTransfer' %] >+ <div class="alert alert-warning">Recall needs transfer</div> > [% ELSIF code == 'NotIssued' %] >- <div class="alert alert-warning">Item was not checked out</div> >+ <div class="alert alert-warning notissued">Item was not checked out</div> > [% ELSIF code == 'WasLost' %] > <div class="alert alert-info">Item was lost, now found</div> > [% ELSIF code == 'withdrawn' %] > <div class="alert alert-warning">Item is withdrawn</div> >- [% ELSIF code == 'Debarred' %] >+ [% ELSIF code.match('Debarred|ForeverDebarred|PrevDebarred') %] > <div class="alert alert-danger">Patron is restricted</div> >+ [% ELSIF code == 'ResFound' %] >+ <div class="alert alert-warning">Hold found</div> >+ [% ELSIF code == 'RecallFound' %] >+ <div class="alert alert-warning">Recall found</div> >+ [% ELSIF code == 'BadBarcode' %] >+ <div class="alert alert-warning">Bad barcode</div> >+ [% ELSIF code == 'TransferArrived' %] >+ <div class="alert alert-info">Transfer arrived from [% result.messages.TransferArrived %]</div> >+ [% ELSIF code == 'TransferredRecall' %] >+ <div class="alert alert-info">Recalled item has been transferred</div> >+ [% ELSIF code == 'WrongTransfer' %] >+ <div class="alert alert-warning">This item is still on transfer to [% result.messages.WrongTransfer %]</div> >+ [% ELSIF code == 'Wrongbranch'%] >+ <div class="alert alert-warning">This item cannot be returned to this branch</div> >+ [% ELSIF code == 'UpdateLastSeenError'%] >+ <div class="alert alert-warning">Error: Patron's last seen date could not be updated; see system logs.</div> >+ [% ELSIF code.match('Transfer(To|Trigger)|WrongTransferItem|WasReturned|LostItem.+|ProcessingFeeRefunded') # ignore %] >+ [% ELSIF code.match('ClaimAutoResolved|ReturnClaims') # ignored too for now %] >+ [% ELSIF code == 'InBundle' # TODO %] >+ [% ELSE # unexpected codes %] >+ <div class="alert alert-warning">Received code [% code %] from AddReturn. Contact support.</div> > [% END %] > [% END %] > </td> >@@ -1601,6 +1638,41 @@ > var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top'); > $("#barcode").focus(); > } >+ function ApplyBatchCheckinSettings() { >+ // check local storage key, fallback to system preference >+ var batch_mode_settings = localStorage.getItem("batch_mode_settings") || >+ '[% Koha.Preference('BatchCheckinDefaults') %]'; >+ >+ if ( batch_mode_settings.match('BATCH_CHECKIN_ENABLED') ) { >+ $("#show-circ-settings a").trigger('click'); >+ $('#batch-mode-toggle').prop('checked', true).trigger('change'); >+ } >+ if ( batch_mode_settings.match('BATCH_CHECKIN_KEEP_SELECTION') ) >+ $('#batch-mode-keep-selection').prop('checked', true); >+ if ( batch_mode_settings.match('BATCH_CHECKIN_IGNORE_NOTISSUED') ) { >+ $('#batch-mode-ignore-notissued').prop('checked', true); >+ $('div.alert.notissued').hide(); >+ } >+ if ( batch_mode_settings.match('BATCH_CHECKIN_CONFIRM_HOLD') ) >+ $('#batch-mode-confirm-hold').prop('checked', true); >+ if ( batch_mode_settings.match('BATCH_CHECKIN_CONFIRM_TRANSFER') ) >+ $('#batch-mode-confirm-transfer').prop('checked', true); >+ } >+ function ChangeBatchCheckinSettings() { >+ // if user does not want to keep, we remove his settings in localStorage >+ if( !$('#batch-mode-keep-selection').prop('checked') ) { >+ localStorage.removeItem("batch_mode_settings"); >+ return; >+ } >+ >+ // Save current settings >+ var batch_mode_settings = 'BATCH_CHECKIN_KEEP_SELECTION,'; >+ if ( $('#batch-mode-toggle').prop('checked') ) batch_mode_settings += 'BATCH_CHECKIN_ENABLED,'; >+ if ( $('#batch-mode-ignore-notissued').prop('checked') ) batch_mode_settings += 'BATCH_CHECKIN_IGNORE_NOTISSUED,'; >+ if ( $('#batch-mode-confirm-hold').prop('checked') ) batch_mode_settings += 'BATCH_CHECKIN_CONFIRM_HOLD,'; >+ if ( $('#batch-mode-confirm-transfer').prop('checked') ) batch_mode_settings += 'BATCH_CHECKIN_CONFIRM_TRANSFER,'; >+ localStorage.setItem( "batch_mode_settings", batch_mode_settings ); >+ } > $(document).ready(function () { > $("#checkin-form").preventDoubleFormSubmit(); > >@@ -1853,6 +1925,7 @@ > 'white-space': 'pre-wrap', > 'resize': 'vertical' > }); >+ $('#batch-mode-more-settings').show(); > } else { > // Switch back to single-line mode > $barcodeTextarea.attr({ >@@ -1864,6 +1937,7 @@ > 'white-space': 'nowrap', > 'resize': 'none' > }); >+ $('#batch-mode-more-settings').hide(); > } > $barcodeTextarea.focus(); > }); >@@ -1887,6 +1961,7 @@ > // Set a debounce timer to submit after RFID scanning finishes > debounceTimer = setTimeout(function() { > isReceivingRFIDInput = false; >+ ChangeBatchCheckinSettings(); > $('#checkin-form').submit(); > }, 500); // 500ms delay after last input > } >@@ -1918,6 +1993,9 @@ > }); > [% END %] > [% END %] >+ >+ ApplyBatchCheckinSettings(); >+ > }); > </script> > [% END %] >-- >2.39.5
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 19814
:
186374
|
186375
|
189487
|
189488
|
189489
|
189490
|
189529
|
189568
|
189586
|
189587
|
189588
|
189589
|
189590
|
189591
|
189592