Koha/koha-tmpl/opac-tmpl/prog/en/modules/sco/receipt.tt
Kyle M Hall 6bae88f43d Bug 9009 - Add separate user js and css for SCO module
Add system preferences SCOUserCSS and SCOUserJS to define separate CSS and JavaScript for the Self Checkout Module.

Test plan:
1) Apply patch
2) Run updatedatabase.pl
3) Add something arbitrary to the new sysprefs SCOUserCSS and SCOUserJS ( such as TestCSS and TestJS ).
4) Load the SCO module in a browser, and view the HTML, verify the CSS and JS values in the system preferences have been included.

Signed-off-by: Marc Veron <veron@veron.ch>

I tested with an alert('hello') as JavaScript and some background-color for the CSS. Worked as expected.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-27 10:05:28 -05:00

55 lines
1 KiB
Text

<!DOCTYPE html PUBLIC "-//W3C//DTD html 4.01 Transitional//EN">
<html>
<head>
<title> RECEIPT </title>
<script language="JavaScript" type="text/javascript">
x = 0;
function callPrint()
{
while (x == 0)
{
self.print();
javascript:window.opener.location='/cgi-bin/koha/sco/sco-main.pl?logout.x=1';
x = 1;
}
}
function closeNow()
{
if (x == 1)
{
setTimeout('self.close()',1000);
}
}
</script>
[% IF ( SCOUserCSS ) %]<style type="text/css">[% SCOUserCSS %]</style>[% END %]
[% IF ( SCOUserJS ) %]<script type="text/javascript">[% SCOUserJS %]</script>[% END %]
</head>
<body onLoad="callPrint(); closeNow();">
[% branchname %]<br><br>
[% cardnumber %]<br>
<!-- begin code Mamata-->
[% IF ( todayissues ) %]<br>
<p><b>Today's checkouts</b></p>
[% FOREACH todayissue IN todayissues %]<br>
[% todayissue.title |html %]<br>
[% todayissue.author %]<br>
[% todayissue.dd %]<br>
[% todayissue.barcode %]<br>
[% END %]
[% END %]
<!-- end code Mamata-->
</body>
</html>