--- /dev/null
+<script type="text/javascript">
+[% IF ( Koha.Preference('IntranetSlipPrinterJS') ) %]
+ [% Koha.Preference('IntranetSlipPrinterJS') %]
+[% ELSE %]
+ $( window ).load(function() {
+ window.print();
+ setTimeout('window.close()', 1);
+ });
+[% END %]
+</script>
+[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] › Self checkout › Print Receipt for [% borrowernumber %]</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
[% IF stylesheet %]
<link rel="stylesheet" type="text/css" href="[% stylesheet %]" />
[% END %]
-<script type="text/javascript">
- function printThenClose() {
- window.print();
- setTimeout('window.close()', 1);
- }
-</script>
+
+<!-- JavaScript includes -->
+<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/jquery.js"></script>
+<script type="text/javascript" src="[% interface %]/[% theme %]/js/global.js"></script>
+
+[% INCLUDE 'slip-print.inc' %]
+
</head>
-<body id="circ_printslip" class="circ" onload="printThenClose();">
+<body id="circ_printslip" class="circ">
<div id="receipt">
[% IF plain %]
<pre>