summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--UI/am-company-logo.html26
-rw-r--r--bin/am.pl52
2 files changed, 35 insertions, 43 deletions
diff --git a/UI/am-company-logo.html b/UI/am-company-logo.html
new file mode 100644
index 00000000..0d2a32e0
--- /dev/null
+++ b/UI/am-company-logo.html
@@ -0,0 +1,26 @@
+<?lsmb INCLUDE 'ui-header.html' ?>
+<?lsmb PROCESS elements.html ?>
+<body>
+<center>
+<a href="http://www.ledgersmb.org" target="_blank"><img src="images/ledgersmb.png" width="200" height="100" border="0" alt="LedgerSMB Logo" /></a>
+<h1 class="login"><?lsmb text('Version [_1]', form.version) ?></h1>
+<p><?lsmb text('Company: [_1]', user.company) ?><br />
+<?lsmb user.address.replace('&lt;br&gt;', '<br />') ?></p>
+
+<table border="0">
+ <tr>
+ <th align="right"><?lsmb text('User') ?></th>
+ <td><?lsmb user.name ?></td>
+ </tr>
+ <tr>
+ <th align="right"><?lsmb text('Dataset') ?></th>
+ <td><?lsmb user.dbname ?></td>
+ </tr>
+ <tr>
+ <th align="right"><?lsmb text('Database Host') ?></th>
+ <td><?lsmb user.dbhost ?></td>
+ </tr>
+</table>
+</center>
+</body>
+</html>
diff --git a/bin/am.pl b/bin/am.pl
index 17cb3acb..581a19a0 100644
--- a/bin/am.pl
+++ b/bin/am.pl
@@ -2209,7 +2209,7 @@ sub generate_yearend {
sub company_logo {
- $myconfig{address} =~ s/\\n/<br>/g;
+ $myconfig{address} =~ s/\\n/<br>/g; # Template cleans this up
$myconfig{dbhost} = $locale->text('localhost') unless $myconfig{dbhost};
$form->{stylesheet} = $myconfig{stylesheet};
@@ -2217,48 +2217,14 @@ sub company_logo {
$form->{title} = $locale->text('About');
# create the logo screen
- $form->header;
-
- print qq|
-<body>
-
-<pre>
-
-</pre>
-<center>
-<a href="http://www.ledgersmb.org/" target="_blank"><img src="images/ledgersmb.png" width="200" height="100" border="0" alt="LedgerSMB Logo" /></a>
-<h1 class="login">| . $locale->text('Version') . qq| $form->{version}</h1>
-
-<p>
-|.$locale->text('Company').qq| :
-<p>
-<b>
-$myconfig{company}
-<br>$myconfig{address}
-</b>
-
-<p>
-<table border=0>
- <tr>
- <th align="right">| . $locale->text('User') . qq|</th>
- <td>$myconfig{name}</td>
- </tr>
- <tr>
- <th align="right">| . $locale->text('Dataset') . qq|</th>
- <td>$myconfig{dbname}</td>
- </tr>
- <tr>
- <th align="right">| . $locale->text('Database Host') . qq|</th>
- <td>$myconfig{dbhost}</td>
- </tr>
-</table>
-
-</center>
-
-</body>
-</html>
-|;
-
+ my $template = LedgerSMB::Template->new_UI(
+ user => \%myconfig,
+ locale => $locale,
+ template => 'am-company-logo');
+ $template->render({
+ form => $form,
+ user => \%myconfig,
+ });
}
sub recurring_transactions {