From: Moritz Bunkus Date: Wed, 18 Jan 2017 12:40:10 +0000 (+0100) Subject: ActionBar: Verwendung beim GoDB-Export X-Git-Tag: release-3.5.4~1295 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6da55ef409e53ffcc707e639ee02cf92a98e5442;p=kivitendo-erp.git ActionBar: Verwendung beim GoDB-Export --- diff --git a/SL/Controller/GoBD.pm b/SL/Controller/GoBD.pm index 7f80faf3d..182d8b26f 100644 --- a/SL/Controller/GoBD.pm +++ b/SL/Controller/GoBD.pm @@ -24,6 +24,7 @@ sub action_filter { $self->to(DateTime->today) if !$self->to; $::request->layout->add_javascripts('kivi.GoBD.js'); + $self->setup_filter_action_bar; $self->render('gobd/filter', current_year => DateTime->today->year, title => t8('GoBD Export')); } @@ -102,4 +103,18 @@ sub available_years { sub init_from { DateTime->from_kivitendo($::form->{from}) } sub init_to { DateTime->from_kivitendo($::form->{to}) } +sub setup_filter_action_bar { + my ($self) = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Export'), + submit => [ '#filter_form', { action => 'GoBD/export' } ], + accesskey => 'enter', + ], + ); + } +} + 1; diff --git a/templates/webpages/gobd/filter.html b/templates/webpages/gobd/filter.html index aaffd0286..6d4eddd50 100644 --- a/templates/webpages/gobd/filter.html +++ b/templates/webpages/gobd/filter.html @@ -25,9 +25,4 @@ [% L.date_tag('to', SELF.to) %] - -[% L.hidden_tag('action', 'GoBD/dispatch') %] - -[% L.submit_tag('action_export', LxERP.t8('Export')) %] -