Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / bin / mozilla / acctranscorrections.pl
index 6ee397f..18d237b 100644 (file)
@@ -1,8 +1,8 @@
 use SL::AccTransCorrections;
 use SL::Form;
+use SL::Locale::String qw(t8);
 use SL::User;
 use Data::Dumper;
-use YAML;
 
 require "bin/mozilla/common.pl";
 
@@ -14,6 +14,8 @@ sub analyze_filter {
   my $form     = $main::form;
   my $locale   = $main::locale;
 
+  setup_analyze_filter_action_bar();
+
   $form->{title}    = $locale->text('General ledger corrections');
   $form->header();
   print $form->parse_html_template('acctranscorrections/analyze_filter');
@@ -47,6 +49,8 @@ sub analyze {
     return;
   }
 
+  setup_analyze_action_bar();
+
   $form->header();
   print $form->parse_html_template('acctranscorrections/analyze_overview',
                                    { 'PROBLEMS' => \@problems,
@@ -251,4 +255,31 @@ sub dispatcher {
   $form->error($locale->text('No action defined.'));
 }
 
+sub setup_analyze_filter_action_bar {
+  my %params = @_;
+
+  for my $bar ($::request->layout->get('actionbar')) {
+    $bar->add(
+      action => [
+        t8('Analyze'),
+        submit    => [ '#form' ],
+        accesskey => 'enter',
+      ],
+    );
+  }
+}
+
+sub setup_analyze_action_bar {
+  my %params = @_;
+
+  for my $bar ($::request->layout->get('actionbar')) {
+    $bar->add(
+      action => [
+        t8('Back'),
+        call => [ 'kivi.history_back' ],
+      ],
+    );
+  }
+}
+
 1;