X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Fcsv_import%2Fform.html;h=f42cdd87348cac38f8b512cfce2f5dc4ff289fd3;hb=6261d6ca23a2943f691d45ae6944da1a37eb7867;hp=792aa2086ed305d480e5e85965146ccf7195a61a;hpb=3f924c0fc876c2133e5ba22f25a45a484885ee0b;p=kivitendo-erp.git
diff --git a/templates/webpages/csv_import/form.html b/templates/webpages/csv_import/form.html
index 792aa2086..f42cdd873 100644
--- a/templates/webpages/csv_import/form.html
+++ b/templates/webpages/csv_import/form.html
@@ -10,7 +10,12 @@
[% L.hidden_tag('form_sent', '1') %]
[% L.hidden_tag('action', 'CsvImport/dispatch') %]
[% L.hidden_tag('profile.type', SELF.profile.type) %]
+ [% L.hidden_tag('csv_import_access', SELF.csv_import_access) %]
+ [%- IF SELF.csv_import_access %]
+ [% L.hidden_tag('force_profile', 1) %]
+ [% L.hidden_tag('profile.id', SELF.profile.id) %]
+ [%- ELSE %]
[%- LxERP.t8('Import profiles') %]
@@ -292,6 +297,39 @@
+[%- UNLESS SELF.worker.is_multiplexed %]
+ [% 'Mappings (csv_import)' | $T8 %]
+
+
+
+
[% LxERP.t8("Hide mappings (csv_import)") %]
+
+
[% 'These mappings can be used to map heading from non standard csv files to known columns. These will also be saved in profiles, so you can save profiles for every source of formats.' | $T8 %]
+
+
+
+
+ [% 'Text in CSV File' | $T8 %]
+ [% 'Known Column' | $T8 %]
+
+
+ [% 'There is nothing here yet (csv_import)' | $T8 %]
+
+[%- FOREACH row = SELF.mappings %]
+ [% PROCESS 'csv_import/_mapping_item.html', item=row IF row.from %]
+[%- END %]
+ [% PROCESS 'csv_import/_mapping_item.html', item={} %]
+
+
+
+
+
+
+
+[%- END %]
+[%- END %]
[% L.submit_tag('action_test', LxERP.t8('Test and preview')) %]
[% L.submit_tag('action_import', LxERP.t8('Import'), style='display:none') %]
@@ -314,7 +352,14 @@
return true;
alert('[% LxERP.t8('Please enter a profile name.') %]');
return false;
- })
+ });
+ $('#add_empty_mapping_line').click(function(){
+ $.get('controller.pl', { action: 'CsvImport/add_empty_mapping_line', 'profile.type': $('#profile_type').val() }, kivi.eval_json_result);
+ });
+ $('#add_mapping_from_upload').click(function(){
+ $.get('controller.pl?action_add_mapping_from_upload=1', $('form').serialize() , kivi.eval_json_result);
+ });
+ $('#csv_import_mappings').on('click', '.remove_line', function(){ $(this).closest('tr').remove(); if (1==$('#csv_import_mappings tr:visible').length) $('#mapping_empty').show() });
});
-->