X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=templates%2Fwebpages%2Fcsv_import%2Fform.html;h=c14fba79337739d0dc0245b725e6cf3a9c6501f9;hb=b4104dc950785d1435c4c4bcc2638ab54f5d90a3;hp=0725a3f3c12c7b2a94e302d1c18f30dd69a5c371;hpb=f5594740f7cb5481956b12c28a2547b924f9f4ee;p=kivitendo-erp.git diff --git a/templates/webpages/csv_import/form.html b/templates/webpages/csv_import/form.html index 0725a3f3c..c14fba793 100644 --- a/templates/webpages/csv_import/form.html +++ b/templates/webpages/csv_import/form.html @@ -1,11 +1,14 @@ -[% USE HTML %][% USE LxERP %][% USE L %] - +[%- USE HTML %] +[%- USE LxERP %] +[%- USE L %] +[%- USE T8 %]
[% FORM.title %]
[%- 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 +26,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')) %] @@ -45,20 +48,75 @@
+

[%- LxERP.t8('Help on column names') %]

+ +
+ [% LxERP.t8("Show help text") %] +
+ + + +
+

[%- LxERP.t8('Settings') %]

- + - + @@ -109,12 +167,76 @@ + [% duplicate_fields = SELF.worker.get_duplicate_check_fields() %] + [% IF ( duplicate_fields.size ) %] + + + + + + + + + + + + [% END %] + +[%- IF SELF.type == 'parts' %] + [%- INCLUDE 'csv_import/_form_parts.html' %] +[%- ELSIF SELF.type == 'customers_vendors' %] + [%- INCLUDE 'csv_import/_form_customers_vendors.html' %] +[%- END %] + + + + + + + + + + + + [%- IF SELF.file.exists %] + + + + + [%- END %] +
[%- LxERP.t8('Number format') %]:[%- 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') %]
[%- 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') %] +
[%- 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 => '*') %]
[%- LxERP.t8('Existing file on server') %]:[%- LxERP.t8('Uploaded on #1, size #2 kB', SELF.file.displayable_mtime, LxERP.format_amount(SELF.file.size / 1024, 2)) %]
- [% L.submit_tag('action_test', LxERP.t8('Gogogo')) %] + [% L.submit_tag('action_test', LxERP.t8('Test and preview')) %] + [% IF (SELF.import_status == 'tested') && SELF.num_importable %] + [% L.submit_tag('action_import', LxERP.t8('Import')) %] + [%- END %]
+ [%- IF SELF.import_status %] + [%- IF SELF.errors %] + [%- PROCESS 'csv_import/_errors.html' %] + [%- END %] + + [%- PROCESS 'csv_import/_result.html' %] + [%- PROCESS 'csv_import/_preview.html' %] + [%- END %] + - -