X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/1ffb42006427be006df310be1e98aad5dd7b1a4d..39294de3fcf40d987865ff17ddab1de070c29f63:/SL/Helper/Flash.pm diff --git a/SL/Helper/Flash.pm b/SL/Helper/Flash.pm new file mode 100644 index 000000000..80742328d --- /dev/null +++ b/SL/Helper/Flash.pm @@ -0,0 +1,22 @@ +package SL::Helper::Flash; + +use strict; + +require Exporter; +our @ISA = qw(Exporter); +our @EXPORT = qw(flash render_flash); + +sub flash { + my $category = shift; + $category = 'info' if $category eq 'information'; + + $::form->{FLASH} ||= { }; + $::form->{FLASH}->{ $category } ||= [ ]; + push @{ $::form->{FLASH}->{ $category } }, @_; +} + +sub render_flash { + return $::form->parse_html_template('common/flash'); +} + +1;