From 13412f21e0093c7940597934cba407cb2fd27505 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 29 Jan 2018 16:11:15 +0100 Subject: [PATCH] =?utf8?q?Wiederkehrende=20Rechnungen:=20Templatevariablen?= =?utf8?q?=20in=20Hash=20oder=20Objekt=20=C3=BCbergeben?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Damit lässt sich das Template auch mit einem PeriodicInvoiceConfig-Objekt aufrufen und kann so von anderen Controllern verwendet werden. --- bin/mozilla/oe.pl | 2 +- .../oe/edit_periodic_invoices_config.html | 38 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 6a3f81126..c1ecf1958 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -2183,7 +2183,7 @@ sub edit_periodic_invoices_config { } $::form->header(no_layout => 1); - print $::form->parse_html_template('oe/edit_periodic_invoices_config', $config); + print $::form->parse_html_template('oe/edit_periodic_invoices_config', {config => $config}); $::lxdebug->leave_sub(); } diff --git a/templates/webpages/oe/edit_periodic_invoices_config.html b/templates/webpages/oe/edit_periodic_invoices_config.html index 5c7ac8b8c..e563d39e3 100644 --- a/templates/webpages/oe/edit_periodic_invoices_config.html +++ b/templates/webpages/oe/edit_periodic_invoices_config.html @@ -10,20 +10,20 @@ - + @@ -33,97 +33,97 @@ [% L.select_tag("order_value_periodicity", [ [ "p", LxERP.t8("same as periodicity") ], [ "m", LxERP.t8("monthly") ], [ "q", LxERP.t8("every third month") ], [ "b", LxERP.t8("semiannually") ], [ "y", LxERP.t8("yearly") ], [ "2", LxERP.t8("2 years") ], [ "3", LxERP.t8("3 years") ], [ "4", LxERP.t8("4 years") ], [ "5", LxERP.t8("5 years") ], ], - default=order_value_periodicity, style=style) %] + default=config.order_value_periodicity, style=style) %] - + - + - + - + - + - + - + - +
[% LxERP.t8('Status') %][% L.checkbox_tag("active", checked => active, label => LxERP.t8('Active')) %][% L.checkbox_tag("active", checked => config.active, label => LxERP.t8('Active')) %]
  - [% L.checkbox_tag('terminated', label => LxERP.t8('terminated'), checked => terminated) %] + [% L.checkbox_tag('terminated', label => LxERP.t8('terminated'), checked => config.terminated) %]
[%- LxERP.t8('Billing Periodicity') %] - [% L.select_tag("periodicity", [ [ "o", LxERP.t8("one time") ], [ "m", LxERP.t8("monthly") ], [ "q", LxERP.t8("every third month") ], [ "b", LxERP.t8("semiannually") ], [ "y", LxERP.t8("yearly") ] ], default=periodicity, style=style) %] + [% L.select_tag("periodicity", [ [ "o", LxERP.t8("one time") ], [ "m", LxERP.t8("monthly") ], [ "q", LxERP.t8("every third month") ], [ "b", LxERP.t8("semiannually") ], [ "y", LxERP.t8("yearly") ] ], default=config.periodicity, style=style) %]
[%- LxERP.t8('Start date') %] - [% L.date_tag("start_date_as_date", start_date_as_date) %] + [% L.date_tag("start_date_as_date", config.start_date_as_date) %]
[%- LxERP.t8('End date') %](1) - [% L.date_tag("end_date_as_date", end_date_as_date) %] + [% L.date_tag("end_date_as_date", config.end_date_as_date) %]
[%- LxERP.t8('Create first invoice on') %](2) - [% L.date_tag("first_billing_date_as_date", first_billing_date_as_date) %] + [% L.date_tag("first_billing_date_as_date", config.first_billing_date_as_date) %]
[% LxERP.t8('Extend automatically by n months') %] - [% L.input_tag("extend_automatically_by", extend_automatically_by, size => 10) %] + [% L.input_tag("extend_automatically_by", config.extend_automatically_by, size => 10) %]
[%- LxERP.t8('Record in') %] - [% L.select_tag("ar_chart_id", AR, title_key => 'description', default => ar_chart_id, style=style) %] + [% L.select_tag("ar_chart_id", AR, title_key => 'description', default => config.ar_chart_id, style=style) %]
[%- LxERP.t8('direct debit') %][% L.checkbox_tag("direct_debit", checked=direct_debit) %][% L.checkbox_tag("direct_debit", checked=config.direct_debit) %]
[%- LxERP.t8('Print automatically') %] - [% L.checkbox_tag("print", onclick => "toggle_printer_id_ctrl()", checked => print) %] + [% L.checkbox_tag("print", onclick => "toggle_printer_id_ctrl()", checked => config.print) %]
[%- LxERP.t8('Printer') %] - [% L.select_tag("printer_id", ALL_PRINTERS, title_key = 'printer_description', default = printer_id, disabled = !print, style=style) %] + [% L.select_tag("printer_id", ALL_PRINTERS, title_key = 'printer_description', default = config.printer_id, disabled = !config.print, style=style) %]
[%- LxERP.t8('Copies') %][% L.input_tag("copies", copies, size => 6, disabled => !print) %][% L.input_tag("copies", config.copies, size => 6, disabled => !config.print) %]
[%- LxERP.t8("Send invoice via email") %][% L.checkbox_tag("send_email", onclick => "toggle_send_email_ctrl()", checked=send_email) %][% L.checkbox_tag("send_email", onclick => "toggle_send_email_ctrl()", checked=config.send_email) %]
[%- LxERP.t8("Contact to send to") %][% L.select_tag("email_recipient_contact_id", ALL_CONTACTS, title_key="full_name_dep", value_key="cp_id", default=email_recipient_contact_id, with_empty=1, disabled=!send_email, style=style) %][% L.select_tag("email_recipient_contact_id", ALL_CONTACTS, title_key="full_name_dep", value_key="cp_id", default=config.email_recipient_contact_id, with_empty=1, disabled=!config.send_email, style=style) %]
[%- LxERP.t8("Other recipients") %]3[% L.input_tag("email_recipient_address", email_recipient_address, disabled=!send_email, style=style) %][% L.input_tag("email_recipient_address", config.email_recipient_address, disabled=!config.send_email, style=style) %]
[%- LxERP.t8("Sender") %]4[% L.input_tag("email_sender", email_sender, disabled=!send_email, style=style) %][% L.input_tag("email_sender", config.email_sender, disabled=!config.send_email, style=style) %]
[%- LxERP.t8("Subject") %][% L.input_tag("email_subject", email_subject, disabled=!send_email, style=style) %][% L.input_tag("email_subject", config.email_subject, disabled=!config.send_email, style=style) %]
[%- LxERP.t8("Message") %][% L.textarea_tag("email_body", email_body, disabled=!send_email, rows=8, style=style) %][% L.textarea_tag("email_body", config.email_body, disabled=!config.send_email, rows=8, style=style) %]

-- 2.20.1