]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Form.pm
Die HTML-Vorlagen werden nun ebenfalls von locales.pl uebersetzt. Dabei werden alle...
[mfinanz.git] / SL / Form.pm
index 95034e57bcb067d22dbdeea0f5c4246d11dacc8e..90f412018895a6931a8815d2de8db440debf45e5 100644 (file)
@@ -245,17 +245,7 @@ sub error {
     $msg =~ s/\n/<br>/g;
 
     $self->header;
-
-    print qq|
-    <body>
-
-    <h2 class=error>Error!</h2>
-
-    <p><b>$msg</b>
-
-    </body>
-    </html>
-    |;
+    $self->show_generic_error($msg);
 
     die "Error: $msg\n";
 
@@ -421,14 +411,15 @@ function fokus(){document.$self->{fokus}.focus();}
   $main::lxdebug->leave_sub();
 }
 
+use Data::Dumper;
 sub parse_html_template {
   $main::lxdebug->enter_sub();
 
-  my ($self, $myconfig, $file, $additional_params) = @_;
+  my ($self, $file, $additional_params) = @_;
 
-  if (-f "templates/webpages/${file}_" . $myconfig->{"countrycode"} .
+  if (-f "templates/webpages/${file}_" . $main::myconfig{"countrycode"} .
       ".html") {
-    $file = "templates/webpages/${file}_" . $myconfig->{"countrycode"} .
+    $file = "templates/webpages/${file}_" . $main::myconfig{"countrycode"} .
       ".html";
   } elsif (-f "templates/webpages/${file}.html") {
     $file = "templates/webpages/${file}.html";
@@ -471,13 +462,13 @@ sub parse_html_template {
 }
 
 sub show_generic_error {
-  my ($self, $myconfig, $error, $title) = @_;
+  my ($self, $error, $title) = @_;
 
   my $add_params = {};
   $add_params->{"title"} = $title if ($title);
   $self->{"label_error"} = $error;
 
-  print($self->parse_html_template($myconfig, "generic/error", $add_params));
+  print($self->parse_html_template("generic/error", $add_params));
 }
 
 # write Trigger JavaScript-Code ($qty = quantity of Triggers)