X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/b331e8b7e14065bc09fda56c0e292543efddd67c..31b247eeafbde0d9c043768489bf1228bd997d60:/SL/Controller/CsvImport.pm diff --git a/SL/Controller/CsvImport.pm b/SL/Controller/CsvImport.pm index 014514d1f..43d6fbf7a 100644 --- a/SL/Controller/CsvImport.pm +++ b/SL/Controller/CsvImport.pm @@ -333,6 +333,8 @@ sub render_inputs { $self->setup_help; + $self->setup_render_inputs_action_bar; + $self->render('csv_import/form', title => $title); } @@ -726,4 +728,25 @@ sub init_mappings { [ grep { $_->{from} } @{ $::form->{mappings} || [] } ] } +sub setup_render_inputs_action_bar { + my ($self, %params) = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Preview'), + submit => [ '#form', { action => 'CsvImport/test' } ], + accesskey => 'enter', + not_if => ($self->profile && $self->profile->get('dont_edit_profile')), + ], + action => [ + t8('Import'), + submit => [ '#form', { action => 'CsvImport/import' } ], + disabled => t8('The test import has not been executed yet.'), + id => 'action_import', + ], + ); + } +} + 1;