From 65482f06a48ef2a6a3bd5e9a5ac7e8c25ddac9be Mon Sep 17 00:00:00 2001 From: Stefan Berndtsson Date: Mon, 25 Sep 2023 14:05:06 +0200 Subject: [PATCH] Bug 35149: Add Option to ignore submit of checkout field when empty 1) Apply patch 2) Set CircAutoPrintQuickSlip to "do nothing" 3) Go to the checkouts form for a specific patron 4) Submit the form with empty value 5) Verify that no action is taken and you stay on the current page Signed-off-by: Laura Escamilla Signed-off-by: Katrin Fischer (cherry picked from commit 3d030ded6bc3d60b6a6e0ca8c6c648b5bb167e0e) Signed-off-by: Fridolin Somers --- .../prog/en/modules/admin/preferences/circulation.pref | 1 + koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index bae185a1f5..2ac7e56c69 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -121,6 +121,7 @@ Circulation: - pref: CircAutoPrintQuickSlip choices: clear: "clear the screen" + ignore: "do nothing" qslip: "open a print quick slip window" slip: "open a print slip window" - . diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 13ed4cc4fb..373ca6fc65 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -1038,6 +1038,8 @@ [% IF ( CircAutoPrintQuickSlip == 'clear' ) %] window.location='/cgi-bin/koha/circ/circulation.pl'; return false; + [% ELSIF ( CircAutoPrintQuickSlip == 'ignore' ) %] + return false; [% ELSE %] window.open("/cgi-bin/koha/members/printslip.pl?borrowernumber=" + borrowernumber + "&print=issue[% CircAutoPrintQuickSlip | html %]", "printwindow"); return false; -- 2.39.5