X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FForm.pm;h=0445a25467d283309baf9c45e24b666f718824d2;hb=75e721508b508648ffe2454f10cfe29ba8a359dd;hp=e4c4dd5b78bb5f3f5814fe654cf74df468d35c14;hpb=b6dc5623d93c1be1c54248d4512e80f495af2899;p=kivitendo-erp.git
diff --git a/SL/Form.pm b/SL/Form.pm
index e4c4dd5b7..0445a2546 100644
--- a/SL/Form.pm
+++ b/SL/Form.pm
@@ -380,6 +380,12 @@ sub header {
my ($stylesheet, $favicon);
if ($ENV{HTTP_USER_AGENT}) {
+ my $doctype;
+
+ if ($ENV{'HTTP_USER_AGENT'} =~ m/MSIE\s+\d/) {
+ # Only set the DOCTYPE for Internet Explorer. Other browsers have problems displaying the menu otherwise.
+ $doctype = qq|\n|;
+ }
my $stylesheets = "$self->{stylesheet} $self->{stylesheets}";
@@ -433,8 +439,7 @@ sub header {
}
print qq|Content-Type: text/html; charset=${db_charset};
-
-
+${doctype}
$self->{titlebar}
$stylesheet
@@ -606,9 +611,10 @@ sub parse_html_template2 {
sub show_generic_error {
my ($self, $error, $title, $action) = @_;
- my $add_params = {};
- $add_params->{"title"} = $title if ($title);
- $self->{"label_error"} = $error;
+ my $add_params = {
+ 'title_error' => $title,
+ 'label_error' => $error,
+ };
my @vars;
if ($action) {
@@ -621,21 +627,26 @@ sub show_generic_error {
}
$add_params->{"VARIABLES"} = \@vars;
+ $self->{title} = $title if ($title);
+
$self->header();
- print($self->parse_html_template("generic/error", $add_params));
+ print $self->parse_html_template2("generic/error", $add_params);
die("Error: $error\n");
}
sub show_generic_information {
- my ($self, $error, $title) = @_;
+ my ($self, $text, $title) = @_;
+
+ my $add_params = {
+ 'title_information' => $title,
+ 'label_information' => $text,
+ };
- my $add_params = {};
- $add_params->{"title"} = $title if ($title);
- $self->{"label_information"} = $error;
+ $self->{title} = $title if ($title);
$self->header();
- print($self->parse_html_template("generic/information", $add_params));
+ print $self->parse_html_template2("generic/information", $add_params);
die("Information: $error\n");
}