[%- USE HTML -%][%- USE LxERP %][%- USE T8 %]
-[%- IF FLASH %]
- [%- BLOCK output %]
- <div class="flash_message_[% type %]">
- <a href='#' style='float:right' onclick='$($(this).closest("div")).remove()'><img src='image/close.png' border='0' alt='[% 'Close Flash' | $T8 %]'></a>
- [%- title %]:
+[%- BLOCK output %]
+ <div id="flash_[% type %]" class="flash_message_[% type %]"[% IF !messages || !messages.size %] style="display: none"[% END %]>
+ <a href='#' style='float:right' onclick='$(this).closest("div").find(".flash_content").empty(); $(this).closest("div").hide()'><img src='image/close.png' border='0' alt='[% 'Close Flash' | $T8 %]'></a>
+ <span class="flash_title">[%- title %]:</span>
+ <span id="flash_[% type %]_content" class="flash_content">
[% FOREACH message = messages %]
[%- HTML.escape(message) %]
[%- UNLESS loop.last %]<br>[% END %]
[%- END %]
- </div>
- [%- END %]
- [%- IF FLASH.error && FLASH.error.size %]
- [%- PROCESS output title=LxERP.t8('Error') type='error' messages = FLASH.error %]
- [%- END %]
- [%- IF FLASH.warning && FLASH.warning.size %]
- [%- PROCESS output title=LxERP.t8('Warning') type='warning' messages = FLASH.warning %]
- [%- END %]
- [%- IF FLASH.info && FLASH.info.size %]
- [%- PROCESS output title=LxERP.t8('Information') type='info' messages = FLASH.info %]
- [%- END %]
+ </span>
+ </div>
[%- END %]
+[%- PROCESS output title=LxERP.t8('Error') type='error' messages = FLASH.error %]
+[%- PROCESS output title=LxERP.t8('Warning') type='warning' messages = FLASH.warning %]
+[%- PROCESS output title=LxERP.t8('Information') type='info' messages = FLASH.info %]