From c45a00e0f354b3ecf9a970c8503e779ba005dce9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Thu, 20 Aug 2020 15:04:04 +0200 Subject: [PATCH] Vorgangsbezeichnung erzwingen auch im Order-Controller --- SL/Controller/Order.pm | 4 ++-- templates/webpages/order/tabs/basic_data.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index 516ad4c36..460b59305 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -1729,7 +1729,7 @@ sub pre_render { $self->get_item_cvpartnumber($_) for @{$self->order->items_sorted}; $::request->{layout}->use_javascript("${_}.js") for qw(kivi.SalesPurchase kivi.Order kivi.File ckeditor/ckeditor ckeditor/adapters/jquery - edit_periodic_invoices_config calculate_qty); + edit_periodic_invoices_config calculate_qty kivi.Validator); $self->setup_edit_action_bar; } @@ -1748,7 +1748,7 @@ sub setup_edit_action_bar { call => [ 'kivi.Order.save', 'save', $::instance_conf->get_order_warn_duplicate_parts, $::instance_conf->get_order_warn_no_deliverydate, ], - checks => [ 'kivi.Order.check_save_active_periodic_invoices' ], + checks => [ 'kivi.Order.check_save_active_periodic_invoices', ['kivi.validate_form','#order_form'] ], ], action => [ t8('Save as new'), diff --git a/templates/webpages/order/tabs/basic_data.html b/templates/webpages/order/tabs/basic_data.html index f3806ff63..c356589cd 100644 --- a/templates/webpages/order/tabs/basic_data.html +++ b/templates/webpages/order/tabs/basic_data.html @@ -85,7 +85,7 @@ [% 'Transaction description' | $T8 %] - [% L.input_tag('order.transaction_description', SELF.order.transaction_description, style='width: 300px') %] + [% L.input_tag('order.transaction_description', SELF.order.transaction_description, 'data-validate'=INSTANCE_CONF.get_require_transaction_description_ps ? 'required' : '', style='width: 300px') %] -- 2.20.1