From 6da55ef409e53ffcc707e639ee02cf92a98e5442 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 18 Jan 2017 13:40:10 +0100 Subject: [PATCH] ActionBar: Verwendung beim GoDB-Export --- SL/Controller/GoBD.pm | 15 +++++++++++++++ templates/webpages/gobd/filter.html | 5 ----- 2 files changed, 15 insertions(+), 5 deletions(-) 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')) %] - -- 2.20.1