From: Sven Schöling <s.schoeling@linet-services.de>
Date: Wed, 25 Jan 2012 12:34:09 +0000 (+0100)
Subject: am/audit_control auf template umgeschrieben.
X-Git-Tag: release-2.7.0beta1~18
X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=71e8211613ad1bfb473f33588521d70c27be1de3;p=kivitendo-erp.git

am/audit_control auf template umgeschrieben.
---

diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl
index 0672e7c39..28b1a5228 100644
--- a/bin/mozilla/am.pl
+++ b/bin/mozilla/am.pl
@@ -1124,55 +1124,17 @@ sub save_preferences {
 }
 
 sub audit_control {
-  $main::lxdebug->enter_sub();
-
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-  my $locale   = $main::locale;
-
-  $main::auth->assert('config');
-
-  $form->{title} = $locale->text('Audit Control');
-
-  AM->closedto(\%myconfig, \%$form);
-
-  $form->header;
-
-  print qq|
-<body>
-
-<form method=post action=am.pl>
-
-<table width=100%>
-  <tr><th class=listtop>$form->{title}</th></tr>
-  <tr height="5"></tr>
-  <tr>
-    <td>
-      <table>
-        <tr>
-          <th>| . $locale->text('Close Books up to') . qq|</th>
-          <td><input name=closedto size=11 title="$myconfig{dateformat}" value=$form->{closedto}></td>
-        </tr>
-      </table>
-    </td>
-  </tr>
-</table>
-
-<hr size=3 noshade>
-
-<br>
-<input type=hidden name=nextsub value=doclose>
+  $::lxdebug->enter_sub;
+  $::auth->assert('config');
 
-<input type=submit class=submit name=action value="|
-    . $locale->text('Continue') . qq|">
+  $::form->{title} = $::locale->text('Audit Control');
 
-</form>
+  AM->closedto(\%::myconfig, $::form);
 
-</body>
-</html>
-|;
+  $::form->header;
+  print $::form->parse_html_template('am/audit_control');
 
-  $main::lxdebug->leave_sub();
+  $::lxdebug->leave_sub;
 }
 
 sub doclose {
diff --git a/templates/webpages/am/audit_control.html b/templates/webpages/am/audit_control.html
new file mode 100644
index 000000000..1675eab5e
--- /dev/null
+++ b/templates/webpages/am/audit_control.html
@@ -0,0 +1,27 @@
+[%- USE HTML %]
+[%- USE LxERP %]
+[%- USE T8 %]
+[%- USE L %]
+<body>
+
+<h1>[% title | html %]</h1>
+
+<form method=post action=am.pl>
+
+<table>
+  <tr>
+    <th>[% 'Close Books up to' | $T8 %]</th>
+    <td>[% L.date_tag('closedto', closedto) %]</td>
+  </tr>
+</table>
+
+<hr size=3 noshade>
+
+<br>
+<input type=hidden name=nextsub value=doclose>
+<input type=submit class=submit name=action value="[% 'Continue' | $T8 %]">
+
+</form>
+
+</body>
+</html>