loading-spinner hinzugefügt
Bernd Wurst

Bernd Wurst commited on 2023-09-06 09:13:03
Zeige 4 geänderte Dateien mit 45 Einfügungen und 6 Löschungen.

... ...
@@ -21,4 +21,11 @@ $(document).ready( function () {
21 21
     $('#dismiss-idle').click( function() {
22 22
         setTimeout(idleAlert, idleTimeout);
23 23
     });
24
+
25
+    $("form").submit(function() {
26
+        $("#loading-spinner-overlay").show();
27
+        setTimeout(() => {
28
+            $("#loading-spinner-overlay").hide();
29
+        }, 5000);
30
+    });
24 31
 });
... ...
@@ -170,3 +170,36 @@ input[type=submit] {
170 170
     margin-top: 5em;
171 171
 }
172 172
 
173
+#loading-spinner-overlay {
174
+    display: none;
175
+    position: fixed;
176
+    left: 0;
177
+    width: 100%;
178
+    top: 0;
179
+    height: 100%;
180
+    background-color: rgba(255,255,255,0.4);
181
+    z-index: 99;
182
+}
183
+#loading-spinner {
184
+    color: #000;
185
+    z-index: 100;
186
+    position: absolute;
187
+    display: block;
188
+    width: 32px;
189
+    height: 32px;
190
+    left: 50%;
191
+    margin-left: -16px;
192
+    top: 50%;
193
+    margin-top: -16px;
194
+    animation: spin 2s infinite linear;
195
+}
196
+
197
+@keyframes spin {
198
+        0% {
199
+            transform: rotate(0deg);
200
+        } 
201
+        100% {
202
+            transform: rotate(360deg);
203
+        }
204
+}
205
+
... ...
@@ -86,11 +86,7 @@ $adresse = $_SESSION['fname'].' '.$_SESSION['lname'];
86 86
 if ($_SESSION['fname'] == 'bekannt') {
87 87
     $adresse = $_SESSION['lname'];
88 88
 }
89
-if ($_SESSION['address'] == 'bekannt' && $_SESSION['city'] == 'bekannt') {
90
-    $adresse .= '<br><i>Adresse wie beim letzten Besuch</i>';
91
-} else {
92
-    $adresse .= '<br>'.$_SESSION['address'].'<br>'.$_SESSION['zip'].' '.$_SESSION['city'];
93
-}
89
+$adresse .= '<br>'.(isset($_SESSION['address']) ? $_SESSION['address'] : '').'<br>'.(isset($_SESSION['zip']) ? $_SESSION['zip'] : '').' '.(isset($_SESSION['city']) ? $_SESSION['city'] : '');
94 90
 
95 91
 $content .= '
96 92
     <p>Aus Ihren Angaben haben wir folgenden Auftrag ermittelt.</p>
... ...
@@ -98,7 +94,6 @@ $content .= '
98 94
     <div class="card mb-3">
99 95
         <div class="card-header">Kundendaten</div>
100 96
         <div class="card-body"><p class="card-text">'.$adresse.'</p><p class="card-text">Tel.: '.$_SESSION['phone'].'</p>
101
-        <a class="btn btn-outline-secondary btn-sm" href="index.php"><i class="fas fa-pencil-alt" aria-hidden="true"></i> Angaben ändern</a>
102 97
         </div>
103 98
     </div>
104 99
 
... ...
@@ -120,5 +120,9 @@ if ($previous > 0) {
120 120
         </div>
121 121
     </div>
122 122
  
123
+    <div id="loading-spinner-overlay">
124
+        <svg id="loading-spinner" xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M304 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm0 416a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM48 304a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm464-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM142.9 437A48 48 0 1 0 75 369.1 48 48 0 1 0 142.9 437zm0-294.2A48 48 0 1 0 75 75a48 48 0 1 0 67.9 67.9zM369.1 437A48 48 0 1 0 437 369.1 48 48 0 1 0 369.1 437z"/></svg>
125
+    </div>
126
+
123 127
  </body>
124 128
 </html>
125 129