ActionBar: Verwendung bei Mahnungskonfiguration
authorMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 30 Jan 2017 16:14:47 +0000 (17:14 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 28 Feb 2017 09:44:03 +0000 (10:44 +0100)
bin/mozilla/dn.pl
templates/webpages/dunning/edit_config.html

index 37c7ef6..c16f6c3 100644 (file)
@@ -84,6 +84,8 @@ sub edit_config {
   $form->{title}      = $locale->text('Edit Dunning Process Config');
   $form->{callback} ||= build_std_url("action=edit_config");
 
+  setup_dn_edit_config_action_bar();
+
   $form->header();
   print $form->parse_html_template("dunning/edit_config");
 
@@ -629,4 +631,18 @@ sub setup_dn_show_dunning_action_bar {
   }
 }
 
+sub setup_dn_edit_config_action_bar {
+  my %params = @_;
+
+  for my $bar ($::request->layout->get('actionbar')) {
+    $bar->add(
+      action => [
+        t8('Save'),
+        submit    => [ '#form', { action => "save" } ],
+        accesskey => 'enter',
+      ],
+    );
+  }
+}
+
 # end of main
index 87345bf..8c29bd0 100644 (file)
@@ -5,7 +5,7 @@
  <script type="text/javascript" src="js/common.js"></script>
  <script type="text/javascript" src="js/dunning.js"></script>
 
- <form method="post" action="dn.pl" name="Form">
+ <form method="post" action="dn.pl" name="Form" id="form">
   <table>
 
    <tr>
    </tr>
   </table>
 
-  <hr size="3" noshade>
-
   <input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
-
-  <input class="submit" type="submit" name="action" value="[% 'Save' | $T8 %]">
-
  </form>
-