From f5594740f7cb5481956b12c28a2547b924f9f4ee Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 23 Feb 2011 18:12:21 +0100 Subject: [PATCH] form_customers_vendors.html nach form.html umbenannt; Kosmetik --- SL/Controller/CsvImport.pm | 20 ++++++------------- ...{form_customers_vendors.html => form.html} | 10 +++++++++- 2 files changed, 15 insertions(+), 15 deletions(-) rename templates/webpages/csv_import/{form_customers_vendors.html => form.html} (91%) diff --git a/SL/Controller/CsvImport.pm b/SL/Controller/CsvImport.pm index 2406362cb..6bacf9242 100644 --- a/SL/Controller/CsvImport.pm +++ b/SL/Controller/CsvImport.pm @@ -107,21 +107,13 @@ sub render_inputs { $self->$sub(($char_map{$type}->{$char} || [])->[0] || $char); } - if ($self->type eq 'customers_vendors') { - $self->render('csv_import/form_customers_vendors', title => $::locale->text('CSV import: customers and vendors')); + my $title = $self->type eq 'customers_vendors' ? $::locale->text('CSV import: customers and vendors') + : $self->type eq 'addresses' ? $::locale->text('CSV import: shipping addresses') + : $self->type eq 'contacts' ? $::locale->text('CSV import: contacts') + : $self->type eq 'parts' ? $::locale->text('CSV import: parts, services and assemblies') + : die; - } elsif ($self->type eq 'addresses') { - $self->render('csv_import/form_addresses', title => $::locale->text('CSV import: shipping addresses')); - - } elsif ($self->type eq 'contacts') { - $self->render('csv_import/form_contacts', title => $::locale->text('CSV import: contacts')); - - } elsif ($self->type eq 'parts') { - $self->render('csv_import/form_parts', title => $::locale->text('CSV import: parts, services and assemblies')); - - } else { - die; - } + $self->render('csv_import/form', title => $title); } sub test_and_import { diff --git a/templates/webpages/csv_import/form_customers_vendors.html b/templates/webpages/csv_import/form.html similarity index 91% rename from templates/webpages/csv_import/form_customers_vendors.html rename to templates/webpages/csv_import/form.html index 50b2438a1..0725a3f3c 100644 --- a/templates/webpages/csv_import/form_customers_vendors.html +++ b/templates/webpages/csv_import/form.html @@ -48,9 +48,17 @@

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

+ + + + + - + -- 2.20.1
[%- 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') %] +
[%- LxERP.t8('Charset') %]:[% L.select_tag('settings.charset', L.options_for_select(SELF.all_charsets, default => SELF.profile.get('charset'))) %][% L.select_tag('settings.charset', L.options_for_select(SELF.all_charsets, default => SELF.profile.get('charset')), style => 'width: 300px') %]