Bugzilla – Attachment 191118 Details for
Bug 41568
Tidy kohaTable block - circ
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41568: Tidy kohaTable - circ/returns.tt
6d19e63.patch (text/plain), 5.22 KB, created by
Jonathan Druart
on 2026-01-09 14:47:11 UTC
(
hide
)
Description:
Bug 41568: Tidy kohaTable - circ/returns.tt
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2026-01-09 14:47:11 UTC
Size:
5.22 KB
patch
obsolete
>From 6d19e630fb53c53d94b06b03da5267b73f14811b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 8 Jan 2026 12:10:19 +0100 >Subject: [PATCH] Bug 41568: Tidy kohaTable - circ/returns.tt > >--- > .../prog/en/modules/circ/returns.tt | 60 +++++++++++-------- > 1 file changed, 36 insertions(+), 24 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 31bea0dc2bd..5e356e264b2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -1503,20 +1503,33 @@ > [% INCLUDE 'calendar.inc' %] > [% Asset.js("js/pages/circulation.js") | $raw %] > [% Asset.js("js/modal_printer.js") | $raw %] >+ <script> >+ /* Set a variable needed by resolve_claim_modal.js or add_catalog_concern.js */ >+ var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]"; >+ >+ var table_settings = [% TablesSettings.GetTableSettings( 'circ', 'returns', 'checkedintable', 'json' ) | $raw %] >+ >+ const reserve_id = "[% reserve_id | html %]"; >+ const recall_id = "[% recall_id | html %]"; >+ >+ const print_slip = [% print_slip ? 1 : 0 | html %]; >+ const recall_slip = [% recall_slip ? 1 : 0 | html %]; >+ const overduecharges = [% overduecharges ? 1 : 0 | html %]; >+ const was_transferred = [% transfer ? 1 : 0 | html %]; >+ >+ addPrefs({ >+ TransfersBlockCirc: [% Koha.Preference('TransfersBlockCirc') ? 1 : 0 | html %], >+ AutomaticConfirmTransfer: [% Koha.Preference('AutomaticConfirmTransfer') ? 1 : 0 | html %], >+ }); >+ </script> >+ > [% IF ( ReturnClaims ) %] >- <script> >- /* Set a variable needed by resolve_claim_modal.js */ >- var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]"; >- </script> > [% Asset.js("js/resolve_claim_modal.js") | $raw %] > [% END %] > [% IF ( Koha.Preference('CatalogConcerns') ) %] >- <script> >- /* Set a variable needed by add_catalog_concern.js */ >- var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]"; >- </script> > [% Asset.js("js/modals/add_catalog_concern.js") | $raw %] > [% END %] >+ > <script> > function Dopop(link) { > var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top'); >@@ -1545,20 +1558,19 @@ > e.preventDefault(); > $(".modal.audio-alert-action").modal("show"); > }); >- [% IF reserve_id %] >+ if (reserve_id){ > $(".print-slip").on('click', function(e) { > e.preventDefault(); >- Dopop("hold-transfer-slip.pl?reserve_id=[% reserve_id | uri %]"); >+ Dopop("hold-transfer-slip.pl?reserve_id=" + reserve_id ); > }); >- [% IF print_slip %] >- Dopop("hold-transfer-slip.pl?reserve_id=[% reserve_id | uri %]"); >- [% END %] >- [% END %] >- var table_settings = [% TablesSettings.GetTableSettings( 'circ', 'returns', 'checkedintable', 'json' ) | $raw %] >+ if (print_slip){ >+ Dopop("hold-transfer-slip.pl?reserve_id=" + reserve_id ); >+ } >+ } > >- [% IF recall_slip %] >- Dopop('/cgi-bin/koha/recalls/recall_pickup_slip.pl?recall_id=[% recall_id | uri %]'); >- [% END %] >+ if (recall_slip){ >+ Dopop('/cgi-bin/koha/recalls/recall_pickup_slip.pl?recall_id=' + recall_id); >+ } > > var returns_table = $("#checkedintable").kohaTable( > { >@@ -1608,7 +1620,7 @@ > $("#barcode").focus(); > }); > >- [% IF(overduecharges) %] >+ if (overduecharges){ > $("#barcode").focus(function () { > if (($("#exemptcheck").prop("checked") == true) || ($("#dropboxcheck").prop("checked") == true)) { > $("#barcode").addClass("input-warning"); >@@ -1619,7 +1631,7 @@ > $("#barcode").blur(function () { > $("#barcode").removeClass("input-warning"); > }); >- [% END %] >+ } > > $('.openWin').on("click",function(e){ > Dopop( $(this).data("url") ); >@@ -1755,16 +1767,16 @@ > ], > }); > >- [% IF ( !(Koha.Preference('TransfersBlockCirc')) && Koha.Preference('AutomaticConfirmTransfer') ) %] >+ if( !prefs.TransfersBlockCirc && prefs.AutomaticConfirmTransfer ){ > $("#wrong-transfer-modal").on('hidden.bs.modal',function(){ > $("#wrongtransferform").submit(); > }); >- [% IF (transfer) %] >+ if (was_transferred){ > $("#item-transfer-modal").on('hidden.bs.modal',function(){ > $("#mainform").submit(); > }); >- [% END %] >- [% END %] >+ } >+ } > }); > </script> > [% END %] >-- >2.43.0 >
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 41568
:
191111
|
191112
|
191113
|
191114
|
191115
|
191116
|
191117
|
191118
|
191119
|
191120
|
191121
|
191122
|
191123
|
191375
|
191376
|
191377
|
191378
|
191379
|
191380
|
191381
|
191382
|
191383
|
191384
|
191385
|
191386
|
191387
|
191388