+[% USE HTML %]
+[% USE LxERP %]
+[% USE L %]
+<body>
+
+ <div class="listtop">[% title %]</div>
+
+ <form name="Form" action="oe.pl" method="post">
+
+ <p>
+ <table border="0">
+ <tr>
+ <th align="right">[%- LxERP.t8('Active') %]</th>
+ <td>[% L.checkbox_tag("active", checked => active) %]</td>
+ </tr>
+
+ <tr>
+ <th align="right" valign="top">[%- LxERP.t8('Periodicity') %]</th>
+ <td valign="top">
+ [% L.radio_button_tag("periodicity", value => "m", label => LxERP.t8("monthly"), checked => periodicity == 'm') %]
+ <br>
+ [% L.radio_button_tag("periodicity", value => "q", label => LxERP.t8("quarterly"), checked => periodicity == 'q') %]
+ <br>
+ [% L.radio_button_tag("periodicity", value => "y", label => LxERP.t8("yearly"), checked => periodicity == 'y') %]
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right">[%- LxERP.t8('Start date') %]</th>
+ <td valign="top">
+ [% L.date_tag("start_date", start_date) %]
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right">[%- LxERP.t8('Record in') %]</th>
+ <td valign="top">
+ [% L.select_tag("ar_chart_id", L.options_for_select(AR, title => 'description', default => ar_chart_id)) %]
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right">[%- LxERP.t8('Print automatically') %]</th>
+ <td valign="top">
+ [% L.checkbox_tag("print", onclick => "toggle_printer_id_ctrl()", checked => print) %]
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right">[%- LxERP.t8('Printer') %]</th>
+ <td valign="top">
+ [% L.select_tag("printer_id", L.options_for_select(ALL_PRINTERS, title => 'printer_description', default => printer_id), disabled => !print) %]
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right">[%- LxERP.t8('Copies') %]</th>
+ <td valign="top">[% L.input_tag("copies", copies, size => 6, disabled => !print) %]</td>
+ </tr>
+ </table>
+ </p>
+
+ [% L.hidden_tag('action', 'save_periodic_invoices_config') %]
+
+ <p>
+ [% L.submit_tag('', LxERP.t8('Close')) %]
+ [% L.submit_tag('', LxERP.t8('Cancel'), onclick => "self.close(); return false;") %]
+ </p>
+ </form>
+
+ <script type="text/javascript">
+ <!--
+ function toggle_printer_id_ctrl() {
+ var disabled = !$('#print').attr('checked');
+ $('#printer_id').attr('disabled', disabled);
+ $('#copies').attr('disabled', disabled);
+ }
+ -->
+ </script>
+
+</body>
+</html>