From efbdf52ccd4543b1e0f9eddecf8977e390c713c0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Thu, 2 Jul 2020 15:28:07 +0200 Subject: [PATCH] =?utf8?q?Auftrags-Controller:=20Sprache=20f.=20=C3=9Cbers?= =?utf8?q?tzung=20im=20E-Mail-Dialog=20verwenden?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/Order.pm | 3 ++- js/kivi.Order.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index e4644983d..689c597aa 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -370,7 +370,8 @@ sub action_show_email_dialog { $form->{$self->nr_key()} = $self->order->number; $form->{formname} = $self->type; $form->{type} = $self->type; - $form->{language} = 'de'; + $form->{language} = '_' . $self->order->language->template_code if $self->order->language; + $form->{language_id} = $self->order->language->id if $self->order->language; $form->{format} = 'pdf'; $email_form->{subject} = $form->generate_email_subject(); diff --git a/js/kivi.Order.js b/js/kivi.Order.js index f50db0462..e4cebb2f5 100644 --- a/js/kivi.Order.js +++ b/js/kivi.Order.js @@ -94,6 +94,7 @@ namespace('kivi.Order', function(ns) { if (!ns.check_cv()) return; var data = $('#order_form').serializeArray(); + data.push({ name: 'order.language_id', value: $('#language_id').val() }); // language from print options data.push({ name: 'action', value: 'Order/show_email_dialog' }); $.post("controller.pl", data, kivi.eval_json_result); -- 2.20.1