From: Bernd Bleßmann Date: Thu, 25 Nov 2021 15:10:57 +0000 (+0100) Subject: Warenstammdaten: EAN: Leerzeichen trimmen X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~285 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=61b62e3c8c98aa1de965cc91927ad421afe1d192;p=kivitendo-erp.git Warenstammdaten: EAN: Leerzeichen trimmen --- diff --git a/SL/Controller/Part.pm b/SL/Controller/Part.pm index 757f1abcd..d2638fb7e 100644 --- a/SL/Controller/Part.pm +++ b/SL/Controller/Part.pm @@ -709,7 +709,7 @@ sub add { sub _set_javascript { my ($self) = @_; - $::request->layout->use_javascript("${_}.js") for qw(kivi.Part kivi.File kivi.PriceRule ckeditor/ckeditor ckeditor/adapters/jquery kivi.ShopPart); + $::request->layout->use_javascript("${_}.js") for qw(kivi.Part kivi.File kivi.PriceRule ckeditor/ckeditor ckeditor/adapters/jquery kivi.ShopPart kivi.Validator); $::request->layout->add_javascripts_inline("\$(function(){kivi.PriceRule.load_price_rules_for_part(@{[ $self->part->id ]})});") if $self->part->id; } @@ -1335,6 +1335,7 @@ sub _setup_form_action_bar { t8('Save'), call => [ 'kivi.Part.save' ], disabled => !$may_edit ? t8('You do not have the permissions to access this function.') : undef, + checks => ['kivi.validate_form'], ], action => [ t8('Use as new'), diff --git a/templates/webpages/part/_basic_data.html b/templates/webpages/part/_basic_data.html index ba18da266..141f49048 100644 --- a/templates/webpages/part/_basic_data.html +++ b/templates/webpages/part/_basic_data.html @@ -33,7 +33,7 @@ [% 'EAN-Code' | $T8 %] - [% L.input_tag("part.ean", SELF.part.ean, size=40) %] + [% L.input_tag("part.ean", SELF.part.ean, size=40, "data-validate"="trimmed_whitespaces") %] [%- IF SELF.all_partsgroups.size %]