From ad3e70bac6a269aff566f0e3e651bf4b4a269b9b Mon Sep 17 00:00:00 2001 From: Vitor FERNANDES Date: Wed, 19 Dec 2012 17:46:18 +0000 Subject: [PATCH] Bug 9279: Problem with quick slip templates Yesterday I was trying the using of quick slip templates in Koha 3.8.7. I've modified the template and then I've done one check out to one patron. Then I tried to print the quick slip, and two thing happened: - If I was in circulation tab of the patron, when printing the quick slip the template was used (printslip.pl was called) - If I was in details tab of the patron, when printing the quick slip the templates wasn't used (moremember.pl was called) To test: - change for example the quickslip template in the notices tools - go to patrons checkout page and do a check out of one item - try to print the quick slip in the same page, and see if the template is used - go to the patron details tab and try to print the quick slip - if the template is used then the bug is corrected, if not the bug still happens - try the slip template too Sponsored-by: KEEP SOLUTIONS Signed-off-by: Kyle M Hall --- .../prog/en/includes/members-toolbar.inc | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc index 9acdf90..d927487 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc @@ -40,10 +40,12 @@ function update_child() { }); // YUI Toolbar Functions - function printx_window(print_type) { - window.open("/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&print=" + print_type, "printwindow"); - return false; - } + var slip_re = /slip/; + function printx_window(print_type) { + var handler = print_type.match(slip_re) ? "printslip" : "moremember"; + window.open("/cgi-bin/koha/members/" + handler + ".pl?borrowernumber=[% borrowernumber %]&print=" + print_type, "printwindow"); + return false; + } function searchToHold(){ var date = new Date(); date.setTime(date.getTime() + (10 * 60 * 1000)); -- 1.7.2.5