Bug 10731: fix use of IntranetSlipPrinterJS by hold slips
authorKyle M Hall <kyle@bywatersolutions.com>
Wed, 14 Aug 2013 18:25:58 +0000 (14:25 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 18 Sep 2013 16:10:54 +0000 (16:10 +0000)
Hold slips aren't printing automatically with JS Print Setup because it
appears the system preference IntranetSlipPrint is never being passed to
the template.

Test Plan:
1) Set up JSPrintSetup
   http://wiki.koha-community.org/wiki/Setting_up_slip_printer_to_print_silently
2) Place a hold
3) Check the item in to capture the hold
4) Click "Print and confirm"
5) Note the slip does not print automatically
6) Apply this patch
7) Repeat steps 2 through 4
8) Observe that the slip now prints automatically

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt

index 9c60023..7dc5b81 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Koha %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>[% title %]</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
@@ -8,8 +9,8 @@
 [% END %]
 
 <script type="text/javascript">
-[% IF ( IntranetSlipPrinterJS ) %]
-    [% IntranetSlipPrinterJS %]
+[% IF ( Koha.Preference('IntranetSlipPrinterJS') ) %]
+    [% Koha.Preference('IntranetSlipPrinterJS') %]
 [% ELSE %]
      function printThenClose() {
          window.print();