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 e31678f771..c24d996e38 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -1670,10 +1670,17 @@ }); $(".print").on("click", function (e) { - this.form.print_slip.value = 1; - let barcode = document.getElementById("confirm-hold-barcode"); - if (barcode) barcode.remove(); - this.form.submit(); + // Open the hold transfer slip synchronously, while the user + // gesture is still active, so it is not blocked as an + // unsolicited popup after the form submission and page reload. + if (this.form && this.form.reserve_id && this.form.reserve_id.value) { + Dopop("hold-transfer-slip.pl?reserve_id=" + encodeURIComponent(this.form.reserve_id.value)); + } + if (this.form) { + let barcode = document.getElementById("confirm-hold-barcode"); + if (barcode) barcode.remove(); + this.form.submit(); + } }); $(".print-recall").on("click", function (e) {