[BUGFIX] Styling of security warnings
authorJohannes Feustel <s@feustel.eu>
Wed, 13 Jul 2011 18:16:56 +0000 (20:16 +0200)
committerSusanne Moog <typo3@susannemoog.de>
Sat, 16 Jul 2011 17:14:56 +0000 (19:14 +0200)
* List style is missing.
* Get rid of inline styles.
* Render p instead of li if only one message comes up (e.g. if reports module is installed).

Change-Id: Ic24b92c74eb55cb54cc3f76d2207c3b10ab4cbea
Releases: 4.6, 4.5
Fixes: #28181
Reviewed-on: http://review.typo3.org/3314
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Stefan Neufeind
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
t3lib/class.t3lib_befunc.php
typo3/sysext/t3skin/stylesheets/visual/element_message.css

index 42b7ec9..d487190 100644 (file)
@@ -4310,10 +4310,13 @@ final class t3lib_BEfunc {
                        }
 
                        if (count($warnings)) {
-                               $style = ' style="margin-bottom:10px;"';
-                               $securityWarnings = '<ul><li' . $style . '>'
-                                               . implode('</li><li' . $style . '>', $warnings)
-                                               . '</li></ul>';
+                               if (count($warnings) > 1) {
+                                       $securityWarnings = '<ul><li>' .
+                                                       implode('</li><li>', $warnings) .
+                                                       '</li></ul>';
+                               } else {
+                                       $securityWarnings = '<p>' . implode('', $warnings) . '</p>';
+                               }
 
                                $securityMessage = t3lib_div::makeInstance(
                                        't3lib_FlashMessage',
index 30b3738..dbe341e 100644 (file)
@@ -13,6 +13,11 @@ Flash Messages (template.php)
        text-decoration: underline;
 }
 
+.typo3-message li {
+       margin-bottom: 10px;
+    list-style: disc;
+}
+
 .typo3-message .message-header {
        font-size: 11px;
        font-weight: bold;