$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();
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);