From: Bernd Bleßmann Date: Sat, 25 Aug 2018 14:12:58 +0000 (+0200) Subject: CustomerVendor-Picker: 'type' nicht als html-Attribut setzen X-Git-Tag: release-3.5.4~312 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=fb722bccec95135d99e8b2b717aece44c71141ad;p=kivitendo-erp.git CustomerVendor-Picker: 'type' nicht als html-Attribut setzen Die Parameter des Picker-Aufrufs werden an das Input-Tag weitergeben und so wurde das type-Attribut mit dem Typ (customer/vendor) des Pickers überschrieben. --- diff --git a/SL/Presenter/CustomerVendor.pm b/SL/Presenter/CustomerVendor.pm index 4a563e46c..ab951720a 100644 --- a/SL/Presenter/CustomerVendor.pm +++ b/SL/Presenter/CustomerVendor.pm @@ -62,6 +62,9 @@ sub customer_vendor_picker { my @classes = $params{class} ? ($params{class}) : (); push @classes, 'customer_vendor_autocomplete'; + # do not use reserved html attribute 'type' for cv type + $params{cv_type} = delete $params{type}; + my $ret = input_tag($name, (ref $value && $value->can('id') ? $value->id : ''), class => "@classes", type => 'hidden', id => $id, 'data-customer-vendor-picker-data' => JSON::to_json(\%params), diff --git a/js/kivi.CustomerVendor.js b/js/kivi.CustomerVendor.js index 6ee499a54..e9b22bedf 100644 --- a/js/kivi.CustomerVendor.js +++ b/js/kivi.CustomerVendor.js @@ -271,7 +271,7 @@ namespace('kivi.CustomerVendor', function(ns) { 'filter.all:substr:multi::ilike': term, 'filter.obsolete': 0, current: this.$real.val(), - type: this.o.type, + type: this.o.cv_type, }; }, set_item: function(item) { diff --git a/templates/webpages/customer_vendor/test_page.html b/templates/webpages/customer_vendor/test_page.html index 94d29fb1f..198a64ce0 100644 --- a/templates/webpages/customer_vendor/test_page.html +++ b/templates/webpages/customer_vendor/test_page.html @@ -25,7 +25,7 @@ fat vendor with change


this one will be a reinit_widget after 4s:
- +