diff --git a/en/index.html b/en/index.html index 41de42a..786ddce 100644 --- a/en/index.html +++ b/en/index.html @@ -759,14 +759,14 @@
- - + +
- - + +
diff --git a/index.html b/index.html index 6576ce7..afb856d 100644 --- a/index.html +++ b/index.html @@ -759,14 +759,14 @@
- - + +
- - + +
diff --git a/js/trial-form.js b/js/trial-form.js index a560183..a7c0017 100644 --- a/js/trial-form.js +++ b/js/trial-form.js @@ -14,6 +14,7 @@ de: { sending: 'Wird gesendet...', send: 'Testzugang anfragen', + nameFehlt: 'Bitte geben Sie Ihren Namen an.', freemail: 'Bitte geben Sie Ihre dienstliche E-Mail-Adresse an. Adressen bei Freemail-Anbietern wie Gmail, GMX oder web.de können wir für einen Testzugang nicht berücksichtigen.', invalidMail: 'Diese E-Mail-Adresse sieht nicht vollständig aus. Bitte prüfen Sie Ihre Eingabe.', consent: 'Bitte bestätigen Sie die Datenschutzhinweise, damit wir Ihre Anfrage bearbeiten dürfen.', @@ -37,6 +38,7 @@ en: { sending: 'Sending...', send: 'Request trial access', + nameFehlt: 'Please enter your name.', freemail: 'Please enter your official work email address. Addresses from free providers such as Gmail, GMX or web.de cannot be accepted for trial access.', invalidMail: 'This email address looks incomplete. Please check your entry.', consent: 'Please confirm the privacy notice so that we may process your request.', @@ -167,12 +169,14 @@ var errorBox = document.getElementById('tf-error'); var btn = form.querySelector('button[type="submit"]'); - var fail = function (msg) { + var fail = function (msg, feldId) { if (errorBox) { errorBox.textContent = msg; errorBox.style.display = 'block'; errorBox.scrollIntoView({ behavior: 'smooth', block: 'center' }); } + var feld = feldId && document.getElementById(feldId); + if (feld) { feld.focus(); } if (btn) { btn.disabled = false; btn.textContent = T.send; } }; @@ -184,9 +188,12 @@ /* Zeitfalle gegen Bots */ if (Date.now() - loadedAt < 4000) return fail(T.tooFast); - if (!plausibleMail(email)) return fail(T.invalidMail); - if (isBlocked(email)) return fail(T.freemail); - if (consent && !consent.checked) return fail(T.consent); + /* Das Formular traegt novalidate, damit die Browsermeldungen die + eigene Pruefung nicht ueberlagern. Pflichtfelder deshalb hier. */ + if (!val('tf-name')) return fail(T.nameFehlt, 'tf-name'); + if (!plausibleMail(email)) return fail(T.invalidMail, 'tf-email'); + if (isBlocked(email)) return fail(T.freemail, 'tf-email'); + if (consent && !consent.checked) return fail(T.consent, 'tf-consent'); if (btn) { btn.disabled = true; btn.textContent = T.sending; } @@ -195,6 +202,7 @@ var zeilen = [ L.head, '', + L.name + ' = ' + val('tf-name'), L.org + ' = ' + (val('tf-org') || e_), L.role + ' = ' + (val('tf-role') || e_), L.mail + ' = ' + email,