ActionBar: Verwendung bei »Benutzereinstellungen«
[kivitendo-erp.git] / bin / mozilla / am.pl
index 8ef1206..ec27fbb 100644 (file)
@@ -42,6 +42,7 @@ use SL::Form;
 use SL::User;
 use SL::USTVA;
 use SL::Iconv;
+use SL::Locale::String qw(t8);
 use SL::TODO;
 use SL::DB::Printer;
 use SL::DB::Tax;
@@ -713,6 +714,8 @@ sub config {
 
   $form->{title}               = $locale->text('Edit Preferences for #1', $::myconfig{login});
 
+  setup_am_config_action_bar();
+
   $form->header();
 
   $form->{full_signature} = $form->create_email_signature();
@@ -1377,3 +1380,17 @@ sub save_bin {
 
   $main::lxdebug->leave_sub();
 }
+
+sub setup_am_config_action_bar {
+  my %params = @_;
+
+  for my $bar ($::request->layout->get('actionbar')) {
+    $bar->add(
+      action => [
+        t8('Save'),
+        submit    => [ '#form', { action => "save_preferences" } ],
+        accesskey => 'enter',
+      ],
+    );
+  }
+}