Behoerde und Funktion optional, Pflichtfelder greifen jetzt wirklich
Behoerde oder Organisation und Funktion oder Dienststelle sind optional, in beiden Sprachen mit Hinweis am Feld. Pflicht bleiben Name, dienstliche E-Mail und die Einwilligung. Dabei aufgefallen, das Formular traegt novalidate, damit die Browsermeldungen die eigene Pruefung nicht ueberlagern. Die Pflichtfelder wurden dadurch bisher gar nicht erzwungen, ein leerer Name waere durchgegangen. Die Pruefung liegt jetzt im Skript, mit Meldung und Fokus auf dem betroffenen Feld. Der Name steht ausserdem mit in der Anfrage-Mail, da die Organisation leer bleiben kann.
Dieser Commit ist enthalten in:
@@ -759,14 +759,14 @@
|
|||||||
<input type="text" id="tf-name" name="name" autocomplete="name" required>
|
<input type="text" id="tf-name" name="name" autocomplete="name" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="tf-org">Authority or organisation</label>
|
<label for="tf-org">Authority or organisation <span class="tf-hint">optional</span></label>
|
||||||
<input type="text" id="tf-org" name="organisation" autocomplete="organization" required>
|
<input type="text" id="tf-org" name="organisation" autocomplete="organization">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="tf-role">Role or department</label>
|
<label for="tf-role">Role or department <span class="tf-hint">optional</span></label>
|
||||||
<input type="text" id="tf-role" name="role" autocomplete="organization-title" required>
|
<input type="text" id="tf-role" name="role" autocomplete="organization-title">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="tf-phone">Phone <span class="tf-hint">optional</span></label>
|
<label for="tf-phone">Phone <span class="tf-hint">optional</span></label>
|
||||||
|
|||||||
@@ -759,14 +759,14 @@
|
|||||||
<input type="text" id="tf-name" name="name" autocomplete="name" required>
|
<input type="text" id="tf-name" name="name" autocomplete="name" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="tf-org">Behörde oder Organisation</label>
|
<label for="tf-org">Behörde oder Organisation <span class="tf-hint">optional</span></label>
|
||||||
<input type="text" id="tf-org" name="organisation" autocomplete="organization" required>
|
<input type="text" id="tf-org" name="organisation" autocomplete="organization">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="tf-role">Funktion oder Dienststelle</label>
|
<label for="tf-role">Funktion oder Dienststelle <span class="tf-hint">optional</span></label>
|
||||||
<input type="text" id="tf-role" name="role" autocomplete="organization-title" required>
|
<input type="text" id="tf-role" name="role" autocomplete="organization-title">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="tf-phone">Telefon <span class="tf-hint">optional</span></label>
|
<label for="tf-phone">Telefon <span class="tf-hint">optional</span></label>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
de: {
|
de: {
|
||||||
sending: 'Wird gesendet...',
|
sending: 'Wird gesendet...',
|
||||||
send: 'Testzugang anfragen',
|
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.',
|
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.',
|
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.',
|
consent: 'Bitte bestätigen Sie die Datenschutzhinweise, damit wir Ihre Anfrage bearbeiten dürfen.',
|
||||||
@@ -37,6 +38,7 @@
|
|||||||
en: {
|
en: {
|
||||||
sending: 'Sending...',
|
sending: 'Sending...',
|
||||||
send: 'Request trial access',
|
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.',
|
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.',
|
invalidMail: 'This email address looks incomplete. Please check your entry.',
|
||||||
consent: 'Please confirm the privacy notice so that we may process your request.',
|
consent: 'Please confirm the privacy notice so that we may process your request.',
|
||||||
@@ -167,12 +169,14 @@
|
|||||||
var errorBox = document.getElementById('tf-error');
|
var errorBox = document.getElementById('tf-error');
|
||||||
var btn = form.querySelector('button[type="submit"]');
|
var btn = form.querySelector('button[type="submit"]');
|
||||||
|
|
||||||
var fail = function (msg) {
|
var fail = function (msg, feldId) {
|
||||||
if (errorBox) {
|
if (errorBox) {
|
||||||
errorBox.textContent = msg;
|
errorBox.textContent = msg;
|
||||||
errorBox.style.display = 'block';
|
errorBox.style.display = 'block';
|
||||||
errorBox.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
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; }
|
if (btn) { btn.disabled = false; btn.textContent = T.send; }
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -184,9 +188,12 @@
|
|||||||
/* Zeitfalle gegen Bots */
|
/* Zeitfalle gegen Bots */
|
||||||
if (Date.now() - loadedAt < 4000) return fail(T.tooFast);
|
if (Date.now() - loadedAt < 4000) return fail(T.tooFast);
|
||||||
|
|
||||||
if (!plausibleMail(email)) return fail(T.invalidMail);
|
/* Das Formular traegt novalidate, damit die Browsermeldungen die
|
||||||
if (isBlocked(email)) return fail(T.freemail);
|
eigene Pruefung nicht ueberlagern. Pflichtfelder deshalb hier. */
|
||||||
if (consent && !consent.checked) return fail(T.consent);
|
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; }
|
if (btn) { btn.disabled = true; btn.textContent = T.sending; }
|
||||||
|
|
||||||
@@ -195,6 +202,7 @@
|
|||||||
var zeilen = [
|
var zeilen = [
|
||||||
L.head,
|
L.head,
|
||||||
'',
|
'',
|
||||||
|
L.name + ' = ' + val('tf-name'),
|
||||||
L.org + ' = ' + (val('tf-org') || e_),
|
L.org + ' = ' + (val('tf-org') || e_),
|
||||||
L.role + ' = ' + (val('tf-role') || e_),
|
L.role + ' = ' + (val('tf-role') || e_),
|
||||||
L.mail + ' = ' + email,
|
L.mail + ' = ' + email,
|
||||||
|
|||||||
In neuem Issue referenzieren
Einen Benutzer sperren