Warnungen nicht wie Fehler formatieren
Bernd Wurst

Bernd Wurst commited on 2019-05-20 17:04:35
Zeige 3 geänderte Dateien mit 31 Einfügungen und 5 Löschungen.

... ...
@@ -81,7 +81,7 @@ function get_messages()
81 81
     </div>';
82 82
     }
83 83
     if (isset($_SESSION['warning'])) {
84
-        $messages .= '<div class="error">
84
+        $messages .= '<div class="warning">
85 85
     <ul>
86 86
     ';
87 87
         foreach ($_SESSION['warning'] as $msg) {
... ...
@@ -54,6 +54,32 @@ div.success {
54 54
         font-weight: bold;
55 55
 }
56 56
 
57
+div.warning {
58
+    color: #FF0000;
59
+    border: 2px solid #FF0000;
60
+    border-radius: 1em;
61
+    background-color: #FFEBCC;
62
+    margin: 10px;
63
+    padding: 10px;
64
+}
65
+
66
+div.warning li:before {
67
+    content: "⚠";
68
+    font-size: 200%;
69
+    font-weight: bold;
70
+    padding-right: 0.6em;
71
+}
72
+div.warning ul {
73
+    padding: 0 1em;
74
+}
75
+
76
+div.warning li {
77
+    font-weight: bold;
78
+    list-style-type: none;
79
+    text-indent: -3em;
80
+    padding-left: 3em;
81
+}
82
+
57 83
 p.warning {
58 84
         padding: 4px;
59 85
         color: #000000;
... ...
@@ -51,14 +51,14 @@ if ($title) {
51 51
 <a id="content" style="display: none"> </a>
52 52
 
53 53
 <?php
54
-if ($messages) {
55
-    echo $messages;
54
+if ($headline) {
55
+    echo "<h3 class=\"headline\">$headline</h3>";
56 56
 }
57 57
 ?>
58 58
 
59 59
 <?php
60
-if ($headline) {
61
-    echo "<h3 class=\"headline\">$headline</h3>";
60
+if ($messages) {
61
+    echo $messages;
62 62
 }
63 63
 ?>
64 64
 
65 65