Vorgangsbezeichnung erzwingen auch im Order-Controller
authorJan Büren <jan@kivitendo.de>
Thu, 20 Aug 2020 13:04:04 +0000 (15:04 +0200)
committerJan Büren <jan@kivitendo.de>
Thu, 20 Aug 2020 13:04:04 +0000 (15:04 +0200)
SL/Controller/Order.pm
templates/webpages/order/tabs/basic_data.html

index 516ad4c..460b593 100644 (file)
@@ -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'),
index f3806ff..c356589 100644 (file)
@@ -85,7 +85,7 @@
 
           <tr>
             <th align="right">[% 'Transaction description' | $T8 %]</th>
-            <td>[% L.input_tag('order.transaction_description', SELF.order.transaction_description, style='width: 300px') %]</td>
+            <td>[% L.input_tag('order.transaction_description', SELF.order.transaction_description, 'data-validate'=INSTANCE_CONF.get_require_transaction_description_ps ? 'required' : '', style='width: 300px') %]</td>
           </tr>
 
           <tr>