Mahnwesen:
[kivitendo-erp.git] / bin / mozilla / licenses.pl
index 52e5e4f..fd8f01d 100644 (file)
@@ -35,6 +35,8 @@ use SL::IC;
 use SL::IS;
 use SL::LICENSES;
 
+require "bin/mozilla/common.pl";
+
 sub quot {
   $lxdebug->enter_sub();
   $_[0] =~ s/\"/\"/g;
@@ -44,6 +46,7 @@ sub quot {
 
 sub form_header {
   $lxdebug->enter_sub();
+  $form->{jsscript} = 1;
   $form->header();
 
   print(
@@ -55,7 +58,7 @@ sub form_header {
 
 sub form_footer {
   $lxdebug->enter_sub();
-  my @items = ("path", "login", "password", "old_callback", "previousform");
+  my @items = qw(login password old_callback previousform);
   push(@items, @{ $form->{"hidden"} });
   map({
       print("<input type=hidden name=$_ value=\"" . quot($form->{$_}) . "\">\n"
@@ -236,8 +239,9 @@ sub print_license_form {
       </tr>
       <tr>
         <th align=right>| . $locale->text('Valid until') . qq|</th>
-        <td><input name=validuntil value=\"|
-      . quot($form->{"validuntil"}) . qq|\"></td>
+        <td><input id=validuntil name=validuntil value=\"|
+      . quot($form->{"validuntil"}) . qq|\">
+         <input type="button" name="validuntil" id="trigger_validuntil" value="?"></td>
       </tr>
       <tr>
         <th align=right>| . $locale->text('Quantity') . qq|</th>
@@ -268,7 +272,10 @@ sub print_license_form {
     qq|
   </tr>
 
-</table>|);
+</table>| .
+    $form->write_trigger(\%myconfig, 1, "validuntil", "BL",
+                         "trigger_validuntil"));
+
   $lxdebug->leave_sub();
 }
 
@@ -359,7 +366,7 @@ sub update {
 
 sub continue {
   $lxdebug->enter_sub();
-  &{ $form->{nextsub} };
+  call_sub($form->{"nextsub"});
   $lxdebug->leave_sub();
 }
 
@@ -494,13 +501,8 @@ sub do_search {
   LICENSES->search(\%myconfig, $form);
 
   $callback = "";
-  foreach (
-           ("db",          "path",        "login",         "password",
-            "partnumber",  "description", "customer_name", "all",
-            "expiring_in", "show_expired")
-    ) {
-    $callback .= "\&${_}=" . $form->escape($form->{$_}, 1);
-  }
+  map { $callback .= "\&${_}=" . $form->escape($form->{$_}, 1) }
+    qw(db login password partnumber description customer_name all expiring_in show_expired);
   $details    = $form->{"script"} . "?action=details" . $callback . "\&id=";
   $invdetails = "is.pl?action=edit" . $callback . "\&id=";
   $callback   = $form->{"script"} . "?action=do_search" . $callback;