From: Moritz Bunkus Date: Thu, 13 Jun 2013 15:01:52 +0000 (+0200) Subject: Form::info() auf Templates umgestellt und Auto-Redirect-Target angepasst X-Git-Tag: release-3.1.0beta1~331^2~13 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=86937e158181c9683401c23cf55bf015d55b784a;p=kivitendo-erp.git Form::info() auf Templates umgestellt und Auto-Redirect-Target angepasst --- diff --git a/SL/Form.pm b/SL/Form.pm index 8a82587e9..d6cba7321 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -315,35 +315,13 @@ sub info { my ($self, $msg) = @_; if ($ENV{HTTP_USER_AGENT}) { - $msg =~ s/\n/
/g; - - if (!$self->{header}) { - $self->header; - print qq||; - } - - print qq| -

$msg

- - - - - |; + $self->header; + print $self->parse_html_template('generic/form_info', { message => $msg }); + } elsif ($self->{info_function}) { + &{ $self->{info_function} }($msg); } else { - - if ($self->{info_function}) { - &{ $self->{info_function} }($msg); - } else { - print "$msg\n"; - } + print "$msg\n"; } $main::lxdebug->leave_sub(); diff --git a/templates/webpages/generic/form_info.html b/templates/webpages/generic/form_info.html new file mode 100644 index 000000000..d56e1fcb0 --- /dev/null +++ b/templates/webpages/generic/form_info.html @@ -0,0 +1,13 @@ +[%- USE P -%] +
+ [% P.simple_format(message) %] +
+ +