From fde20d92197192347baeb854f681376cac812d74 Mon Sep 17 00:00:00 2001 From: Mason James Date: Fri, 12 Apr 2013 15:55:48 +1200 Subject: [PATCH] Bug 8033 - add print receipt option to Koha self-check (edit) 4 misc follow-up fixes 1/ fixed printslip.tmpl typo 2/ fixed display bug 3/ moved hardcoded text string from script to template. 4/ delete unused receipt.tt file To Test: - Sign in to self checkout. - Enter a barcode and click submit. - Click the finish button - You should be prompted with a message asking if you would like a receipt. If you click OK you should be taken to the page with the receipt. If you click Cancel you should not see the reciept and you should be logged out. fyi: you should no longer see a "<title> Print Receipt for..." line in chrome/IE Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> --- .../opac-tmpl/prog/en/modules/sco/printslip.tt | 4 +- koha-tmpl/opac-tmpl/prog/en/modules/sco/receipt.tt | 57 -------------------- opac/sco/printslip.pl | 4 +- 3 files changed, 5 insertions(+), 60 deletions(-) delete mode 100644 koha-tmpl/opac-tmpl/prog/en/modules/sco/receipt.tt diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/sco/printslip.tt b/koha-tmpl/opac-tmpl/prog/en/modules/sco/printslip.tt index 44954b3..a27009e 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/sco/printslip.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/sco/printslip.tt @@ -1,5 +1,7 @@ [% INCLUDE 'doc-head-open.inc' %] -<title>[% title %] + + Print Receipt for [% borrowernumber %] + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/sco/receipt.tt b/koha-tmpl/opac-tmpl/prog/en/modules/sco/receipt.tt deleted file mode 100644 index 8339b35..0000000 --- a/koha-tmpl/opac-tmpl/prog/en/modules/sco/receipt.tt +++ /dev/null @@ -1,57 +0,0 @@ - - - - - RECEIPT - - - -[% IF ( SCOUserCSS ) %][% END %] -[% IF ( SCOUserJS ) %][% END %] - - - - - -[% branchname %]

-[% cardnumber %]
- - -[% IF ( todayissues ) %]
-

Today's checkouts

-[% FOREACH todayissue IN todayissues %]
-[% todayissue.title |html %]
-[% todayissue.author %]
-[% todayissue.dd %]
-[% todayissue.barcode %]
-[% END %] -[% END %] - - - - - - - diff --git a/opac/sco/printslip.pl b/opac/sco/printslip.pl index e8a5685..09c6c6a 100755 --- a/opac/sco/printslip.pl +++ b/opac/sco/printslip.pl @@ -45,7 +45,7 @@ my $error = $input->param('error'); # patrons still need to be able to print receipts my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => "/sco/printslip.tmpl", + template_name => "/sco/printslip.tt", query => $input, type => "opac", } @@ -61,7 +61,7 @@ if (my $letter = IssueSlip ($session->param('branch') || $branch, $borrowernumbe $template->{VARS}->{slip} = $slip; $template->{VARS}->{plain} = !$is_html; -$template->{VARS}->{title} = "Print Receipt for $borrowernumber"; +$template->{VARS}->{borrowernumber} = $borrowernumber; $template->{VARS}->{stylesheet} = C4::Context->preference("SlipCSS"); $template->{VARS}->{error} = $error; -- 1.7.2.5