Minimal an Rails' "flash"-Methode angelehnt, heißt auch so,
funktioniert aber noch nicht über Request-Grenzen hinweg. Ausgabe
erfolgt momentan nur in alle Einkaufs- und
Verkaufsbeleg-Bearbeiten-Masken.
Conflicts:
bin/mozilla/io.pl
templates/webpages/do/form_header.html
templates/webpages/ir/form_header.html
templates/webpages/is/form_header.html
templates/webpages/oe/form_header.html
$main::lxdebug->leave_sub();
}
+sub flash {
+ my $category = shift;
+
+ $::form->{FLASH} ||= { };
+ $::form->{FLASH}->{ $category } ||= [ ];
+ push @{ $::form->{FLASH}->{ $category } }, @_;
+}
+
+sub render_flash {
+ return $::form->parse_html_template('common/flash');
+}
+
if ($::use_rdbo) {
eval {
require SL::DB::Helpers::Mappings;
height:0;
visibility:hidden;
}
+
+.flash_message_error {
+ background-color:#FFD6D6;
+ border: 1px solid #AE0014;
+ margin-top: 2px;
+ margin-bottom: 2px;
+}
+
+.flash_message_warning {
+ background-color:#FFE8C7;
+ border: 1px solid #FF6600;
+ margin-top: 2px;
+ margin-bottom: 2px;
+}
+
+.flash_message_info {
+ background-color:#DCF2FF;
+ border: 1px solid #4690FF;
+ margin-top: 2px;
+ margin-bottom: 2px;
+}
<div class="listtop">[% title %]</div>
+[%- INCLUDE 'common/flash.html' %]
+
[%- IF ERRORS && ERRORS.size %]
<p><font color="#ff0000">[% ERRORS.join('<br>') %]</font></p>
[%- END %]
<p><div class="listtop" width="100%">[% title %]</div></p>
+[%- INCLUDE 'common/flash.html' %]
+
<table width="100%">
<tr>
<td valign="top">
<p>[% saved_message %]</p>
+[%- INCLUDE 'common/flash.html' %]
+
<table width="100%">
<tr>
<td valign="top">
<div class="listtop">[% title %]</div>
+[%- INCLUDE 'common/flash.html' %]
+
<table width="100%">
<tr height="5"></tr>
<tr>