From 34d6cbb9ca26e5fdaa892583c6e04f0bbe2a125b Mon Sep 17 00:00:00 2001 From: Andreas Hnida Date: Fri, 23 Feb 2024 13:27:48 +0000 Subject: [PATCH] =?UTF-8?q?Spinner=20f=C3=BCr=20Button=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/js/bestellformular.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/assets/js/bestellformular.js b/assets/js/bestellformular.js index 74876cc..9ab5568 100644 --- a/assets/js/bestellformular.js +++ b/assets/js/bestellformular.js @@ -1,6 +1,6 @@ window.onload = function () { - const FORMDEBUG = true; + const FORMDEBUG = false; // initieiere Zeitmessung zur Botprevention var startTime = Date.now(); @@ -26,6 +26,10 @@ window.onload = function () { const btn = document.getElementById('bestellformular-btn'); const zsrTooltip = document.getElementById('zsr-tooltip'); + // Spinner und button disabled anzeigen + + + var endTime = Date.now(); var timeSpent = (endTime - startTime) / 1000; // Zeit in Sekunden @@ -45,6 +49,21 @@ window.onload = function () { return; } + btn.innerHTML = ` + + + + + + ` + + btn.disabled = true; + if (FORMDEBUG) { console.log("userInteracted: " + userInteracted); console.log("timeSpent: " + timeSpent);