+ [% duplicate_fields = SELF.worker.get_duplicate_check_fields() %]
+ [% IF ( duplicate_fields.size ) %]
+ <tr>
+ <th align="right">[%- LxERP.t8('Check for duplicates') %]:</th>
+
+ <td colspan=10>
+ [% FOREACH key = duplicate_fields.keys %]
+ <input type="checkbox" name="settings.duplicates_[% key | html %]" id="settings.duplicates_[% key | html %]" value="1"[% IF ( SELF.profile.get('duplicates_'_ key) || (duplicate_fields.$key.default && !FORM.form_sent ) ) %] checked="checked"[% END %]>
+ <label for="settings.duplicates_[% key | html %]">[% duplicate_fields.$key.label | html %]</label>
+ [% END %]
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right"></th>
+
+ <td colspan=10>
+ [% 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') %]
+ </td>
+ </tr>
+ [% END %]
+
+[%- IF SELF.type == 'parts' %]
+ [%- INCLUDE 'csv_import/_form_parts.html' %]
+[%- ELSIF SELF.type == 'customers_vendors' %]
+ [%- INCLUDE 'csv_import/_form_customers_vendors.html' %]
+[%- END %]
+
+ <tr>
+ <th align="right">[%- LxERP.t8('Preview Mode') %]:</th>
+ <td colspan="10">
+ [% 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')) %]
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right">[%- LxERP.t8('Import file') %]:</th>
+ <td colspan="10">[% L.input_tag('file', '', type => 'file', accept => '*') %]</td>
+ </tr>
+
+ [%- IF SELF.file.exists %]
+ <tr>
+ <th align="right">[%- LxERP.t8('Existing file on server') %]:</th>
+ <td colspan="10">[%- LxERP.t8('Uploaded on #1, size #2 kB', SELF.file.displayable_mtime, LxERP.format_amount(SELF.file.size / 1024, 2)) %]</td>
+ </tr>
+ [%- END %]
+