From ba9d5b02062f363b46f3b209a1d96f7849a7d277 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Mon, 17 Mar 2025 15:08:23 +0000 Subject: [PATCH] Bug 39361: Wrap modal JS in document ready function To test: 1. Find or create an item with a hold on it. 2. Go to Circulation > Transfers 3. Transfer the item from step 1. 4. No modal appears to warn that the item has a hold. 5. APPLY PATCH 6. Try step 3 again, this time the modal should appear correctly. --- .../intranet-tmpl/prog/en/modules/circ/branchtransfers.tt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt index 4a9a7d5b3ce..56dd9901695 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt @@ -301,9 +301,11 @@ var to_branch = $(this).attr('data-tobranch'); window.open("/cgi-bin/koha/circ/transfer-slip.pl?transferitem=" + itemnumber + "&branchcode=" + to_branch); }); - [% IF ( found ) %] - $("#transfer_confirm").modal("show"); - [% END %] + $(document).ready( function() { + [% IF ( found ) %] + $("#transfer_confirm").modal('show'); + [% END %] + }); [% END %] -- 2.39.5