From 48c1a0d14f75731bd0e8ad2af2a9318e0bead25e Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 18 Sep 2020 13:53:29 +0000 Subject: [PATCH] Bug 12224: (follow-up) Move button to patron column in checkins table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch moves the "Print checkin slip" out of its own column and into the colum containing patron information. I think this makes more sense because the slip is specific to a patron, not the individual item which has been checked in. Also changed: printcheckinslip function should be triggered via a class, not a non-unique ID. The function should handle the click using "preventDefault" rather than "return false." To test, apply the patch and check in some items checked out to various patrons. - In the table of checked-in items, confirm that the "Print checkin slip" appears correctly in the column of patron information. - Confirm that the button works correctly to print the correct slip for the associated patron. Signed-off-by: David Nind Signed-off-by: Alexandra Speer Signed-off-by: Katrin Fischer Signed-off-by: Christian Stelzenmüller Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 9 +++------ 1 file changed, 3 insertions(+), 6 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 a956317761..d60cd46087 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -857,7 +857,6 @@ Collection Patron Note -   @@ -928,6 +927,7 @@ [% END %] + Print checkin slip [% ELSE %] Not checked out [% END %] @@ -943,9 +943,6 @@

[% riloo.itemnotes_nonpublic | html %]

[% END %] - - Print checkin slip - [% END # /FOREACH riloo %] @@ -1144,10 +1141,10 @@ }); $('[data-toggle="tooltip"]').tooltip(); - $("#printcheckinslip").click(function(){ + $(".printcheckinslip").on("click", function(e){ + e.preventDefault(); var borrowernumber = $(this).data('borrowernumber'); window.open("/cgi-bin/koha/members/printslip.pl?borrowernumber=" + borrowernumber + "&print=checkinslip", "printwindow"); - return false; }); }); -- 2.11.0