From: Moritz Bunkus
Date: Thu, 26 Jan 2017 10:53:32 +0000 (+0100)
Subject: ActionBar: Vernwendung bei Bankbewegungen
X-Git-Tag: release-3.5.4~1284
X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2003e0561586fca5e9fe5d825ab4d470411fe32a;p=kivitendo-erp.git
ActionBar: Vernwendung bei Bankbewegungen
---
diff --git a/SL/Controller/BankTransaction.pm b/SL/Controller/BankTransaction.pm
index 7fa25d7b2..d154667d5 100644
--- a/SL/Controller/BankTransaction.pm
+++ b/SL/Controller/BankTransaction.pm
@@ -48,6 +48,7 @@ sub action_search {
my $bank_accounts = SL::DB::Manager::BankAccount->get_all_sorted( query => [ obsolete => 0 ] );
+ $self->setup_search_action_bar;
$self->render('bank_transactions/search',
BANK_ACCOUNTS => $bank_accounts);
}
@@ -58,6 +59,7 @@ sub action_list_all {
$self->make_filter_summary;
$self->prepare_report;
+ $self->setup_list_all_action_bar;
$self->report_generator_list_objects(report => $self->{report}, objects => $self->models->get);
}
@@ -893,6 +895,34 @@ sub load_ap_record_template_url {
);
}
+sub setup_search_action_bar {
+ my ($self, %params) = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ t8('Filter'),
+ submit => [ '#search_form', { action => 'BankTransaction/list' } ],
+ accesskey => 'enter',
+ ],
+ );
+ }
+}
+
+sub setup_list_all_action_bar {
+ my ($self, %params) = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ t8('Filter'),
+ submit => [ '#filter_form', { action => 'BankTransaction/list_all' } ],
+ accesskey => 'enter',
+ ],
+ );
+ }
+}
+
1;
__END__
diff --git a/templates/webpages/bank_transactions/_filter.html b/templates/webpages/bank_transactions/_filter.html
index 3eb2d0a35..662554f2a 100644
--- a/templates/webpages/bank_transactions/_filter.html
+++ b/templates/webpages/bank_transactions/_filter.html
@@ -61,12 +61,9 @@
-[% L.hidden_tag('action', 'BankTransaction/dispatch') %]
[% L.hidden_tag('sort_by', FORM.sort_by) %]
[% L.hidden_tag('sort_dir', FORM.sort_dir) %]
[% L.hidden_tag('page', FORM.page) %]
-[% L.input_tag('action_list_all', LxERP.t8('Continue'), type = 'submit', class='submit')%]
-
[% L.button_tag('$("#filter_form").resetForm()', LxERP.t8('Reset')) %]
diff --git a/templates/webpages/bank_transactions/search.html b/templates/webpages/bank_transactions/search.html
index 3e234cdec..2ea2ef450 100644
--- a/templates/webpages/bank_transactions/search.html
+++ b/templates/webpages/bank_transactions/search.html
@@ -5,7 +5,7 @@
[%- INCLUDE 'common/flash.html' %]
-
-
-
-
- [% L.hidden_tag('action', 'BankTransaction/list') %]
-
- [% L.submit_tag('dummy', LxERP.t8('Continue')) %]