X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Fcsv_import%2Fform.html;h=be359f3b8c818d6abb9928ac0da9a5e6c6faff11;hb=345248fd59538b5bfabc5fc54defdc17f76481f3;hp=7157dda9bca88fb9c44e0bef77e96765584c1fc7;hpb=3e3652cbf6f9ffb9b75a4252df4a2546c0bef081;p=kivitendo-erp.git diff --git a/templates/webpages/csv_import/form.html b/templates/webpages/csv_import/form.html index 7157dda9b..be359f3b8 100644 --- a/templates/webpages/csv_import/form.html +++ b/templates/webpages/csv_import/form.html @@ -1,4 +1,7 @@ -[% USE HTML %][% USE LxERP %][% USE L %] +[%- USE HTML %] +[%- USE LxERP %] +[%- USE L %] +[%- USE T8 %]
[% FORM.title %]
@@ -6,6 +9,7 @@ [%- INCLUDE 'common/flash.html' %]
+ [% L.hidden_tag('form_sent', '1') %] [% L.hidden_tag('action', 'CsvImport/dispatch') %] [% L.hidden_tag('profile.type', SELF.profile.type) %] @@ -23,7 +27,7 @@ [%- LxERP.t8('Existing profiles') %]: - [% L.select_tag('profile.id', L.options_for_select(SELF.all_profiles, title => 'name', default => SELF.profile.id), style => 'width: 300px') %] + [% L.select_tag('profile.id', SELF.all_profiles, title_key = 'name', default = SELF.profile.id, style = 'width: 300px') %] [% L.submit_tag('action_new', LxERP.t8('Load profile')) %] @@ -72,11 +76,23 @@

[%- LxERP.t8('At least one of the columns #1, customer, customernumber, vendor, vendornumber (depending on the target table) is required for matching the entry to an existing customer or vendor.', 'cp_cv_id') %]

+ [%- ELSIF SELF.type == 'addresses' %]

[%- LxERP.t8('At least one of the columns #1, customer, customernumber, vendor, vendornumber (depending on the target table) is required for matching the entry to an existing customer or vendor.', 'trans_id') %]

+ +[%- ELSIF SELF.type == 'parts' %] +

+ [%- LxERP.t8("If the article type is set to 'mixed' then a column called 'type' must be present.") %] + [% LxERP.t8("Type can be either 'part' or 'service'.") %] +

[%- END %] + +

+ [%- L.submit_tag('action_download_sample', LxERP.t8('Download sample file')) %] +

+
@@ -87,14 +103,13 @@ [%- LxERP.t8('Number Format') %]: - [% SET options = L.options_for_select([ '1.000,00', '1000,00', '1,000.00', '1000.00' ], default => SELF.profile.get('numberformat')) %] - [% L.select_tag('settings.numberformat', options, style => 'width: 300px') %] + [% L.select_tag('settings.numberformat', ['1.000,00', '1000,00', '1,000.00', '1000.00'], default = SELF.profile.get('numberformat'), style = 'width: 300px') %] [%- LxERP.t8('Charset') %]: - [% L.select_tag('settings.charset', L.options_for_select(SELF.all_charsets, default => SELF.profile.get('charset')), style => 'width: 300px') %] + [% L.select_tag('settings.charset', SELF.all_charsets, default = SELF.profile.get('charset'), style = 'width: 300px') %] @@ -145,15 +160,30 @@ - - [%- LxERP.t8('Check for duplicates') %]: - - [% opts = [ [ 'no_check', LxERP.t8('Do not check for duplicates') ], - [ 'check_csv', LxERP.t8('Discard duplicate entries in CSV file') ], - [ 'check_db', LxERP.t8('Discard entries with duplicates in database or CSV file') ] ] %] - [% L.select_tag('settings.duplicates', L.options_for_select(opts, default => SELF.profile.get('duplicates')), style => 'width: 300px') %] - - + [% duplicate_fields = SELF.worker.get_duplicate_check_fields() %] + [% IF ( duplicate_fields.size ) %] + + [%- LxERP.t8('Check for duplicates') %]: + + + [% FOREACH key = duplicate_fields.keys %] + + + [% END %] + + + + + + + + [% opts = [ [ 'no_check', LxERP.t8('Do not check for duplicates') ], + [ 'check_csv', LxERP.t8('Discard duplicate entries in CSV file') ], + [ 'check_db', LxERP.t8('Discard entries with duplicates in database or CSV file') ] ] %] + [% L.select_tag('settings.duplicates', opts, default = SELF.profile.get('duplicates'), style = 'width: 300px') %] + + + [% END %] [%- IF SELF.type == 'parts' %] [%- INCLUDE 'csv_import/_form_parts.html' %] @@ -161,6 +191,15 @@ [%- INCLUDE 'csv_import/_form_customers_vendors.html' %] [%- END %] + + [%- LxERP.t8('Preview Mode') %]: + + [% L.radio_button_tag('settings.full_preview', value=2, checked=SELF.profile.get('full_preview')==2, label=LxERP.t8('Full Preview')) %] + [% L.radio_button_tag('settings.full_preview', value=1, checked=SELF.profile.get('full_preview')==1, label=LxERP.t8('Only Warnings and Errors')) %] + [% L.radio_button_tag('settings.full_preview', value=0, checked=!SELF.profile.get('full_preview'), label=LxERP.t8('First 20 Lines')) %] + + + [%- LxERP.t8('Import file') %]: [% L.input_tag('file', '', type => 'file', accept => '*') %] @@ -203,5 +242,3 @@ }); --> - -