X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/3f924c0fc876c2133e5ba22f25a45a484885ee0b..76592c8a3:/templates/webpages/csv_import/form.html
diff --git a/templates/webpages/csv_import/form.html b/templates/webpages/csv_import/form.html
index 792aa2086..3796ced6e 100644
--- a/templates/webpages/csv_import/form.html
+++ b/templates/webpages/csv_import/form.html
@@ -11,6 +11,10 @@
[% L.hidden_tag('action', 'CsvImport/dispatch') %]
[% L.hidden_tag('profile.type', SELF.profile.type) %]
+ [%- IF SELF.profile.get('dont_edit_profile') %]
+ [% L.hidden_tag('force_profile', 1) %]
+ [% L.hidden_tag('profile.id', SELF.profile.id) %]
+ [%- ELSE %]
[%- LxERP.t8('Import profiles') %]
@@ -292,7 +296,40 @@
+[%- 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 %]
[% L.submit_tag('action_test', LxERP.t8('Test and preview')) %]
+[%- END %]
[% L.submit_tag('action_import', LxERP.t8('Import'), style='display:none') %]
@@ -314,7 +351,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() });
});
-->