From 3d03be3c86ec619144682d25701690a5ccc38c60 Mon Sep 17 00:00:00 2001 From: hdl Date: Thu, 14 Nov 2002 18:48:14 +0000 Subject: [PATCH] Templating mancredit and maninvoice --- mancredit.pl | 32 ++++---------------------------- maninvoice.pl | 37 +++++-------------------------------- 2 files changed, 9 insertions(+), 60 deletions(-) diff --git a/mancredit.pl b/mancredit.pl index 5612e214b9..afa599fa04 100755 --- a/mancredit.pl +++ b/mancredit.pl @@ -24,6 +24,7 @@ use strict; use C4::Output; use CGI; +use HTML::Template; use C4::Search; use C4::Accounts2; my $input=new CGI; @@ -42,32 +43,7 @@ if ($add){ manualinvoice($bornum,$itemnum,$desc,$type,$amount); print $input->redirect("/cgi-bin/koha/moremember.pl?bornum=$bornum"); } else { - print $input->header; - print startpage(); - print startmenu('member'); -print <

Manual Credit

-
- - - - - - - - - -
Borrowernumber$bornum
Type - -
Itemnumber
Description
Amount
-
-printend -; -print endmenu('member'); -print endpage(); - + my $template = gettemplate("mancredit.tmpl"); + $template->param( bornum => $bornum); + print "Content-Type: text/html\n\n", $template->output; } diff --git a/maninvoice.pl b/maninvoice.pl index 105f825184..ac323c418d 100755 --- a/maninvoice.pl +++ b/maninvoice.pl @@ -26,8 +26,9 @@ use C4::Output; use CGI; use C4::Search; use C4::Accounts2; -my $input=new CGI; +use HTML::Template; +my $input=new CGI; my $bornum=$input->param('bornum'); #get borrower details @@ -42,35 +43,7 @@ if ($add){ manualinvoice($bornum,$itemnum,$desc,$type,$amount); print $input->redirect("/cgi-bin/koha/moremember.pl?bornum=$bornum"); } else { - print $input->header; - print startpage(); - print startmenu('member'); -print <

Manual Invoice

-
- - - - - - - - - -
Borrowernumber$bornum
Type - -
Itemnumber
Description
Amount
-
-printend -; -print endmenu('member'); -print endpage(); - + my $template=gettemplate("maninvoice.tmpl"); + $template->param( bornum => $bornum); + print "Content-Type: text/html\n\n", $template->output; } -- 2.39.5