summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-26 20:57:40 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-26 20:57:40 +0000
commit323ed79bf81fa5e9bba4c1b14cb2c48ffeda614e (patch)
tree632f230f196d649d7754f0e27b2b7182bf511a98 /bin
parent6c5c1c36fa682244c355f6c06808ec715f0a2baa (diff)
Adding localization support to templates (for UI) and porting over to parameterized arguments
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1106 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin')
-rw-r--r--bin/arapprn.pl8
-rw-r--r--bin/cp.pl4
-rw-r--r--bin/io.pl3
-rw-r--r--bin/pos.pl3
-rw-r--r--bin/rp.pl11
5 files changed, 20 insertions, 9 deletions
diff --git a/bin/arapprn.pl b/bin/arapprn.pl
index 223518d0..0d256c28 100644
--- a/bin/arapprn.pl
+++ b/bin/arapprn.pl
@@ -288,7 +288,9 @@ sub print_check {
if ( ( $form->{'media'} eq 'screen' ) and ( $form->{'format'} eq 'html' ) )
{
my $template =
- LedgerSMB::Template->new( \%myconfig, $form->{'formname'}, 'HTML' );
+ LedgerSMB::Template->new(
+ user => \%myconfig, template => $form->{'formname'},
+ format => 'HTML' );
try {
$template->render($form);
$form->header;
@@ -561,7 +563,9 @@ sub print_transaction {
if ( ( $form->{'media'} eq 'screen' ) and ( $form->{'format'} eq 'html' ) )
{
my $template =
- LedgerSMB::Template->new( \%myconfig, $form->{'formname'}, 'HTML' );
+ LedgerSMB::Template->new(
+ user => \%myconfig, template => $form->{'formname'},
+ format => 'HTML' );
try {
$template->render($form);
$form->header;
diff --git a/bin/cp.pl b/bin/cp.pl
index 6a9fc309..d21fa18b 100644
--- a/bin/cp.pl
+++ b/bin/cp.pl
@@ -49,6 +49,7 @@ use LedgerSMB::CP;
use LedgerSMB::OP;
use LedgerSMB::IS;
use LedgerSMB::IR;
+use LedgerSMB::Template;
require "bin/arap.pl";
@@ -1475,7 +1476,8 @@ sub print_form {
if ( ( $form->{'media'} eq 'screen' ) and ( $form->{'format'} eq 'html' ) )
{
my $template =
- LedgerSMB::Template->new( \%myconfig, $form->{'formname'}, 'HTML' );
+ LedgerSMB::Template->new( user => \%myconfig,
+ template => $form->{'formname'}, format => 'HTML' );
try {
$template->render($form);
$form->header;
diff --git a/bin/io.pl b/bin/io.pl
index 4c41462d..d1a00af9 100644
--- a/bin/io.pl
+++ b/bin/io.pl
@@ -1770,7 +1770,8 @@ sub print_form {
if ( ( $form->{'media'} eq 'screen' ) and ( $form->{'format'} eq 'html' ) )
{
my $template =
- LedgerSMB::Template->new( \%myconfig, $form->{'formname'}, 'HTML' );
+ LedgerSMB::Template->new( user => \%myconfig,
+ template => $form->{'formname'}, format => 'HTML' );
try {
$template->render($form);
$form->header;
diff --git a/bin/pos.pl b/bin/pos.pl
index f4192cb6..8cc8d73c 100644
--- a/bin/pos.pl
+++ b/bin/pos.pl
@@ -1010,7 +1010,8 @@ sub print_form {
if ( ( $form->{'media'} eq 'screen' ) and ( $form->{'format'} eq 'html' ) )
{
my $template =
- LedgerSMB::Template->new( \%myconfig, $form->{'formname'}, 'HTML' );
+ LedgerSMB::Template->new(user => \%myconfig,
+ template => $form->{'formname'}, format => 'HTML' );
try {
$template->render($form);
$form->header;
diff --git a/bin/rp.pl b/bin/rp.pl
index a962ada1..a5c906d3 100644
--- a/bin/rp.pl
+++ b/bin/rp.pl
@@ -1083,7 +1083,8 @@ sub generate_income_statement {
if ( ( $form->{'media'} eq 'screen' ) and ( $form->{'format'} eq 'html' ) )
{
my $template =
- LedgerSMB::Template->new( \%myconfig, $form->{'formname'}, 'HTML' );
+ LedgerSMB::Template->new( user => \%myconfig,
+ template => $form->{'formname'}, format => 'HTML' );
try {
$template->render($form);
$form->header;
@@ -1139,7 +1140,8 @@ sub generate_balance_sheet {
if ( ( $form->{'media'} eq 'screen' ) and ( $form->{'format'} eq 'html' ) )
{
my $template =
- LedgerSMB::Template->new( \%myconfig, $form->{'formname'}, 'HTML' );
+ LedgerSMB::Template->new( user => \%myconfig,
+ template => $form->{'formname'}, format => 'HTML' );
try {
$template->render($form);
$form->header;
@@ -2293,8 +2295,9 @@ sub print_form {
and ( $form->{'format'} eq 'html' ) )
{
my $template =
- LedgerSMB::Template->new( \%myconfig, $form->{'formname'},
- 'HTML' );
+ LedgerSMB::Template->new( user => \%myconfig,
+ template => $form->{'formname'},
+ format => 'HTML' );
try {
$template->render($form);
$form->header;