From 684bfa98815dc55f7ef7ff48547667673f1aae32 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 18 Oct 2019 12:58:27 +0200 Subject: [PATCH] Auftrags-Controller: Spracheinstellungen aus Druck-/E-Mail-Dialog speichern. --- SL/Controller/Order.pm | 13 +++++-------- js/kivi.Order.js | 3 +++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index 9b4f42f6d..c19c87f2c 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -1649,10 +1649,11 @@ sub pre_render { $self->{positions_scrollbar_height} = SL::Helper::UserPreferences::PositionsScrollbar->new()->get_height(); my $print_form = Form->new(''); - $print_form->{type} = $self->type; - $print_form->{printers} = SL::DB::Manager::Printer->get_all_sorted; - $print_form->{languages} = SL::DB::Manager::Language->get_all_sorted; - $self->{print_options} = SL::Helper::PrintOptions->get_print_options( + $print_form->{type} = $self->type; + $print_form->{printers} = SL::DB::Manager::Printer->get_all_sorted; + $print_form->{languages} = SL::DB::Manager::Language->get_all_sorted; + $print_form->{language_id} = $self->order->language_id; + $self->{print_options} = SL::Helper::PrintOptions->get_print_options( form => $print_form, options => {dialog_name_prefix => 'print_options.', show_headers => 1, @@ -2145,10 +2146,6 @@ should be implemented. C does not use the currently inserted string for filtering. -=item * - -The language selected in print or email dialog is not saved when the order is saved. - =back =head1 To discuss / Nice to have diff --git a/js/kivi.Order.js b/js/kivi.Order.js index e77b63e15..6c739b5d5 100644 --- a/js/kivi.Order.js +++ b/js/kivi.Order.js @@ -51,6 +51,7 @@ namespace('kivi.Order', function(ns) { if (warn_on_reqdate && !ns.check_valid_reqdate()) 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/' + action }); $.post("controller.pl", data, kivi.eval_json_result); @@ -82,6 +83,7 @@ namespace('kivi.Order', function(ns) { var data = $('#order_form').serializeArray(); data = data.concat($('#print_options_form').serializeArray()); + data.push({ name: 'order.language_id', value: $('#language_id').val() }); // language from print options data.push({ name: 'action', value: 'Order/print' }); $.post("controller.pl", data, kivi.eval_json_result); @@ -147,6 +149,7 @@ namespace('kivi.Order', function(ns) { var data = $('#order_form').serializeArray(); data = data.concat($('[name^="email_form."]').serializeArray()); data = data.concat($('[name^="print_options."]').serializeArray()); + data.push({ name: 'order.language_id', value: $('#language_id').val() }); // language from print options data.push({ name: 'action', value: 'Order/send_email' }); $.post("controller.pl", data, kivi.eval_json_result); }; -- 2.20.1