$form->error($locale->text('Could not write the temporary HTML file.'));
}
- $html_file->print($form->parse_html_template('report_generator/pdf_report', $variables));
+ $html_file->print($form->parse_html_template2('report_generator/pdf_report', $variables));
$html_file->close();
my $cmdline =
$form->{title} = $locale->text('PDF export -- options');
$form->header();
- print $form->parse_html_template('report_generator/pdf_export_options',
- { 'HIDDEN' => \@form_values,
- 'default_margin' => $form->format_amount(\%myconfig, 1.5),
- 'SHOW_PRINTERS' => scalar @{ $form->{ALL_PRINTERS} },
- });
+ print $form->parse_html_template2('report_generator/pdf_export_options', { 'HIDDEN' => \@form_values });
$lxdebug->leave_sub();
}
$form->{title} = $locale->text('CSV export -- options');
$form->header();
- print $form->parse_html_template('report_generator/csv_export_options', { 'HIDDEN' => \@form_values });
+ print $form->parse_html_template2('report_generator/csv_export_options', { 'HIDDEN' => \@form_values });
$lxdebug->leave_sub();
}
-<body>
+[% USE HTML %]<body>
<script type="text/javascript">
<!--
-->
</script>
- <div class="listheading" width="100%"><TMPL_VAR title ESCAPE=HTML></div>
+ <div class="listheading" width="100%">[% HTML.escape(title) %]</div>
- <form action="<TMPL_VAR script ESCAPE=HTML>" method="post" name="report_generator_form">
+ <form action="[% HTML.escape(script) %]" method="post" name="report_generator_form">
- <TMPL_LOOP HIDDEN><input type="hidden" name="<TMPL_VAR key ESCAPE=HTML>" value="<TMPL_VAR value ESCAPE=HTML>">
- </TMPL_LOOP>
+ [%- FOREACH var = HIDDEN %]
+ <input type="hidden" name="[% HTML.escape(var.key) %]" value="[% HTML.escape(var.value) %]">
+ [%- END %]
<input type="hidden" name="report_generator_csv_options_set" value="1">
<input type="hidden" name="report_generator_dispatch_to" value="">
-<body>
+[% USE HTML %]<body>
<script type="text/javascript">
<!--
-->
</script>
- <div class="listheading" width="100%"><TMPL_VAR title ESCAPE=HTML></div>
+ <div class="listheading" width="100%">[% HTML.escape(title) %]</div>
- <form action="<TMPL_VAR script ESCAPE=HTML>" method="post" name="report_generator_form">
+ <form action="[% HTML.escape(script) %]" method="post" name="report_generator_form">
- <TMPL_LOOP HIDDEN><input type="hidden" name="<TMPL_VAR key ESCAPE=HTML>" value="<TMPL_VAR value ESCAPE=HTML>">
- </TMPL_LOOP>
+ [%- FOREACH var = HIDDEN %]
+ <input type="hidden" name="[% HTML.escape(var.key) %]" value="[% HTML.escape(var.value) %]">
+ [%- END %]
<input type="hidden" name="report_generator_csv_options_set" value="1">
<input type="hidden" name="report_generator_dispatch_to" value="">
-<body>
+[% USE HTML %][% USE LxERP %]<body>
+
+ [%- SET default_margin = LxERP.format_amount(1.5) %]
<script type="text/javascript">
<!--
-->
</script>
- <div class="listheading" width="100%"><TMPL_VAR title ESCAPE=HTML></div>
+ <div class="listheading" width="100%">[% HTML.escape(title) %]</div>
- <form action="<TMPL_VAR script ESCAPE=HTML>" method="post" name="report_generator_form">
+ <form action="[% HTML.escape(script) %]" method="post" name="report_generator_form">
- <TMPL_LOOP HIDDEN><input type="hidden" name="<TMPL_VAR key ESCAPE=HTML>" value="<TMPL_VAR value ESCAPE=HTML>">
- </TMPL_LOOP>
+ [%- FOREACH var = HIDDEN %]
+ <input type="hidden" name="[% HTML.escape(var.key) %]" value="[% HTML.escape(var.value) %]">
+ [%- END %]
<input type="hidden" name="report_generator_pdf_options_set" value="1">
<input type="hidden" name="report_generator_dispatch_to" value="">
<tr>
<td align="right">Schriftgröße</td>
- <td><input name="report_generator_pdf_options_font_size" size="4" value="10">pt</td>
+ <td><input name="report_generator_pdf_options_font_size" size="4" value="10"> pt</td>
</tr>
<tr>
<tr>
<td align="right">Oben</td>
- <td><input name="report_generator_pdf_options_margin_top" size="4" value="<TMPL_VAR default_margin ESCAPE=HTML>">cm</td>
+ <td><input name="report_generator_pdf_options_margin_top" size="4" value="[% HTML.escape(default_margin) %]"> cm</td>
</tr>
<tr>
<td align="right">Links</td>
- <td><input name="report_generator_pdf_options_margin_left" size="4" value="<TMPL_VAR default_margin ESCAPE=HTML>">cm</td>
+ <td><input name="report_generator_pdf_options_margin_left" size="4" value="[% HTML.escape(default_margin) %]"> cm</td>
</tr>
<tr>
<td align="right">Unten</td>
- <td><input name="report_generator_pdf_options_margin_bottom" size="4" value="<TMPL_VAR default_margin ESCAPE=HTML>">cm</td>
+ <td><input name="report_generator_pdf_options_margin_bottom" size="4" value="[% HTML.escape(default_margin) %]"> cm</td>
</tr>
<tr>
<td align="right">Rechts</td>
- <td><input name="report_generator_pdf_options_margin_right" size="4" value="<TMPL_VAR default_margin ESCAPE=HTML>">cm</td>
+ <td><input name="report_generator_pdf_options_margin_right" size="4" value="[% HTML.escape(default_margin) %]"> cm</td>
</tr>
<tr>
<td valign="top">
<input type="checkbox" name="report_generator_pdf_options_number" value="1" checked>
Seiten nummerieren
- <TMPL_IF SHOW_PRINTERS>
+ [% IF ALL_PRINTERS.size %]
<br>
<input type="checkbox" name="report_generator_pdf_options_print" value="1">
Liste ausdrucken
- </TMPL_IF>
+ [% END %]
</td>
</tr>
- <TMPL_IF SHOW_PRINTERS>
+ [% IF ALL_PRINTERS.size %]
<tr>
<td align="right">Drucker</td>
<td>
<select name="report_generator_pdf_options_printer_id">
- <TMPL_LOOP ALL_PRINTERS><option value="<TMPL_VAR id ESCAPE=HTML>"<TMPL_IF selected> selected</TMPL_IF>><TMPL_VAR printer_description ESCAPE=HTML></option></TMPL_LOOP>
+ [%- FOREACH printer = ALL_PRINTERS %]
+ <option value="[% HTML.escape(printer.id) %]"[% IF printer.selected %] selected[% END %]>[% HTML.escape(printer.printer_description) %]</option>
+ [%- END %]
</select>
</td>
</tr>
<tr>
<td align="right">Kopien</td>
- <td><input name="report_generator_pdf_options_copies" size="4" value="<TMPL_VAR copies ESCAPE=HTML>"></td>
+ <td><input name="report_generator_pdf_options_copies" size="4" value="[% HTML.escape(copies) %]"></td>
</tr>
- </TMPL_IF>
+ [% END %]
</table>
<p>
-<body>
+[% USE HTML %][% USE LxERP %]<body>
+
+ [%- SET default_margin = LxERP.format_amount(1.5) %]
<script type="text/javascript">
<!--
-->
</script>
- <div class="listheading" width="100%"><TMPL_VAR title ESCAPE=HTML></div>
+ <div class="listheading" width="100%">[% HTML.escape(title) %]</div>
- <form action="<TMPL_VAR script ESCAPE=HTML>" method="post" name="report_generator_form">
+ <form action="[% HTML.escape(script) %]" method="post" name="report_generator_form">
- <TMPL_LOOP HIDDEN><input type="hidden" name="<TMPL_VAR key ESCAPE=HTML>" value="<TMPL_VAR value ESCAPE=HTML>">
- </TMPL_LOOP>
+ [%- FOREACH var = HIDDEN %]
+ <input type="hidden" name="[% HTML.escape(var.key) %]" value="[% HTML.escape(var.value) %]">
+ [%- END %]
<input type="hidden" name="report_generator_pdf_options_set" value="1">
<input type="hidden" name="report_generator_dispatch_to" value="">
<tr>
<td align="right"><translate>Font size</translate></td>
- <td><input name="report_generator_pdf_options_font_size" size="4" value="10">pt</td>
+ <td><input name="report_generator_pdf_options_font_size" size="4" value="10"> pt</td>
</tr>
<tr>
<tr>
<td align="right"><translate>Top</translate></td>
- <td><input name="report_generator_pdf_options_margin_top" size="4" value="<TMPL_VAR default_margin ESCAPE=HTML>">cm</td>
+ <td><input name="report_generator_pdf_options_margin_top" size="4" value="[% HTML.escape(default_margin) %]"> cm</td>
</tr>
<tr>
<td align="right"><translate>Left</translate></td>
- <td><input name="report_generator_pdf_options_margin_left" size="4" value="<TMPL_VAR default_margin ESCAPE=HTML>">cm</td>
+ <td><input name="report_generator_pdf_options_margin_left" size="4" value="[% HTML.escape(default_margin) %]"> cm</td>
</tr>
<tr>
<td align="right"><translate>Bottom</translate></td>
- <td><input name="report_generator_pdf_options_margin_bottom" size="4" value="<TMPL_VAR default_margin ESCAPE=HTML>">cm</td>
+ <td><input name="report_generator_pdf_options_margin_bottom" size="4" value="[% HTML.escape(default_margin) %]"> cm</td>
</tr>
<tr>
<td align="right"><translate>Right</translate></td>
- <td><input name="report_generator_pdf_options_margin_right" size="4" value="<TMPL_VAR default_margin ESCAPE=HTML>">cm</td>
+ <td><input name="report_generator_pdf_options_margin_right" size="4" value="[% HTML.escape(default_margin) %]"> cm</td>
</tr>
<tr>
<td valign="top">
<input type="checkbox" name="report_generator_pdf_options_number" value="1" checked>
<translate>Number pages</translate>
- <TMPL_IF SHOW_PRINTERS>
+ [% IF ALL_PRINTERS.size %]
<br>
<input type="checkbox" name="report_generator_pdf_options_print" value="1">
<translate>Print list</translate>
- </TMPL_IF>
+ [% END %]
</td>
</tr>
- <TMPL_IF SHOW_PRINTERS>
+ [% IF ALL_PRINTERS.size %]
<tr>
<td align="right"><translate>Printer</translate></td>
<td>
<select name="report_generator_pdf_options_printer_id">
- <TMPL_LOOP ALL_PRINTERS><option value="<TMPL_VAR id ESCAPE=HTML>"<TMPL_IF selected> selected</TMPL_IF>><TMPL_VAR printer_description ESCAPE=HTML></option></TMPL_LOOP>
+ [%- FOREACH printer = ALL_PRINTERS %]
+ <option value="[% HTML.escape(printer.id) %]"[% IF printer.selected %] selected[% END %]>[% HTML.escape(printer.printer_description) %]</option>
+ [%- END %]
</select>
</td>
</tr>
<tr>
<td align="right"><translate>Copies</translate></td>
- <td><input name="report_generator_pdf_options_copies" size="4" value="<TMPL_VAR copies ESCAPE=HTML>"></td>
+ <td><input name="report_generator_pdf_options_copies" size="4" value="[% HTML.escape(copies) %]"></td>
</tr>
- </TMPL_IF>
+ [% END %]
</table>
<p>
-<html>
+[% USE HTML %]<html>
<body>
- <div width="100%"><TMPL_VAR TITLE></div>
+ <div width="100%">[% TITLE %]</div>
- <TMPL_IF TOP_INFO_TEXT>
- <p><TMPL_VAR TOP_INFO_TEXT></p>
- </TMPL_IF>
+ [%- IF TOP_INFO_TEXT %]
+ <p>[% TOP_INFO_TEXT %]</p>
+ [%- END %]
<p>
<table width="100%">
<tr>
- <TMPL_LOOP COLUMN_HEADERS>
- <th><TMPL_IF link><a href="<TMPL_VAR link>"></TMPL_IF><TMPL_VAR text ESCAPE=HTML><TMPL_IF link></a></TMPL_IF></th>
- </TMPL_LOOP>
+ [%- FOREACH col = COLUMN_HEADERS %]
+ <th>[% IF col.link %]<a href="[% col.link %]">[% END %][% HTML.escape(col.text) %][% IF col.link %]</a>[% END %]</th>
+ [%- END %]
</tr>
- <TMPL_LOOP ROWS>
- <tr>
- <TMPL_LOOP COLUMNS><td<TMPL_IF align> align="<TMPL_VAR align>"</TMPL_IF><TMPL_IF valign> valign="<TMPL_VAR valign>"</TMPL_IF>><TMPL_LOOP CELL_ROWS><TMPL_IF data><TMPL_VAR data></TMPL_IF><TMPL_UNLESS __last__><br></TMPL_UNLESS></TMPL_LOOP></td></TMPL_LOOP>
- </tr>
- </TMPL_LOOP>
+ [%- FOREACH row = ROWS %]
+ <tr>
+ [%- FOREACH col = row.COLUMNS %]
+ <td[% IF col.align %] align="[% col.align %]"[% END %][% IF col.valign %] valign="[% col.valign %]"[% END %]>
+ [%- FOREACH cell_row = col.CELL_ROWS %][%- cell_row.data %][%- UNLESS loop.last %]<br>[%- END %][%- END %]
+ </td>
+ [%- END %]
+ </tr>
+ [%- END %]
</table>
</p>
- <TMPL_IF BOTTOM_INFO_TEXT>
- <p><TMPL_VAR BOTTOM_INFO_TEXT></p>
- </TMPL_IF>
+ [%- IF BOTTOM_INFO_TEXT %]
+ <p>[% BOTTOM_INFO_TEXT %]</p>
+ [%- END %]
</body>
</html>
-<html>
+[% USE HTML %]<html>
<body>
- <div width="100%"><TMPL_VAR TITLE></div>
+ <div width="100%">[% TITLE %]</div>
- <TMPL_IF TOP_INFO_TEXT>
- <p><TMPL_VAR TOP_INFO_TEXT></p>
- </TMPL_IF>
+ [%- IF TOP_INFO_TEXT %]
+ <p>[% TOP_INFO_TEXT %]</p>
+ [%- END %]
<p>
<table width="100%">
<tr>
- <TMPL_LOOP COLUMN_HEADERS>
- <th><TMPL_IF link><a href="<TMPL_VAR link>"></TMPL_IF><TMPL_VAR text ESCAPE=HTML><TMPL_IF link></a></TMPL_IF></th>
- </TMPL_LOOP>
+ [%- FOREACH col = COLUMN_HEADERS %]
+ <th>[% IF col.link %]<a href="[% col.link %]">[% END %][% HTML.escape(col.text) %][% IF col.link %]</a>[% END %]</th>
+ [%- END %]
</tr>
- <TMPL_LOOP ROWS>
- <tr>
- <TMPL_LOOP COLUMNS><td<TMPL_IF align> align="<TMPL_VAR align>"</TMPL_IF><TMPL_IF valign> valign="<TMPL_VAR valign>"</TMPL_IF>><TMPL_LOOP CELL_ROWS><TMPL_IF data><TMPL_VAR data></TMPL_IF><TMPL_UNLESS __last__><br></TMPL_UNLESS></TMPL_LOOP></td></TMPL_LOOP>
- </tr>
- </TMPL_LOOP>
+ [%- FOREACH row = ROWS %]
+ <tr>
+ [%- FOREACH col = row.COLUMNS %]
+ <td[% IF col.align %] align="[% col.align %]"[% END %][% IF col.valign %] valign="[% col.valign %]"[% END %]>
+ [%- FOREACH cell_row = col.CELL_ROWS %][%- cell_row.data %][%- UNLESS loop.last %]<br>[%- END %][%- END %]
+ </td>
+ [%- END %]
+ </tr>
+ [%- END %]
</table>
</p>
- <TMPL_IF BOTTOM_INFO_TEXT>
- <p><TMPL_VAR BOTTOM_INFO_TEXT></p>
- </TMPL_IF>
+ [%- IF BOTTOM_INFO_TEXT %]
+ <p>[% BOTTOM_INFO_TEXT %]</p>
+ [%- END %]
</body>
</html>