Regex ignores whitespaces now and added all fallback pages

This commit is contained in:
2020-12-11 23:53:42 +01:00
parent 3cd8670cef
commit b32cc63e76
6 changed files with 37 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="de" xmlns:th="https://www.thymeleaf.org/">
<head>
<meta charset="UTF-8">
@@ -8,7 +8,7 @@
<body>
<h1 style="color: red;"> Jeder darf nur einmal abstimmen! </h1>
<a href="http://abizeitung-voting.ddns.net">Return to Login-Site</a>
<a href="/">Return to Login-Site</a>
</body>
</html>

View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="de" xmlns:th="https://www.thymeleaf.org/">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h1 style="color: red;">Du hast deine Motto schon gewählt!</h1>
<a href="/">Return to Login-Site</a>
</body>
</html>

View File

@@ -1,10 +1,14 @@
<!DOCTYPE html>
<html lang="de" xmlns:th="https://www.thymeleaf.org/">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<body>
<h1 style="color: red;">Du hast deine Kandidaten schon vorgeschlagen!</h1>
<a href="/">Return to Login-Site</a>
</body>
</html>

View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="de" xmlns:th="https://www.thymeleaf.org/">
<head>
<meta charset="UTF-8">
<title>Abizeitung 2020/2021 Voting</title>
</head>
<body>
<h1 style="color: red;"> Der eingegebene Name entspricht nicht den Vorgaben </h1>
<a href="/">Return to Login-Site</a>
</body>
</html>

View File

@@ -8,7 +8,7 @@
<body>
<h1> Überprüfe noch einmal die eingegebene E-Mail Adresse Sollte der Fall eintreten, dass du deine E-Mail Adresse richtig eingegeben hast und du Schüler der Q2 bist, schreibe eine Mail an simon.bussmann@adolfinum.de mit dem Betreff LoginFehler</h1>
<a href="http://abizeitung-voting.ddns.net">Try again</a>
<a href="/">Return to Login-Site</a>
</body>
</html>

View File

@@ -18,7 +18,7 @@
function test() {
let input_field = document.getElementById("email_input");
let input = input_field.value;
if (!input.match("[a-z]+\\.[a-z]+@adolfinum+\\.de$")) {
if (!input.trim().match("[a-z]+\\.[a-z]+@adolfinum+\\.de$")) {
input_field.value = "";
alert("Die Email-Adresse \"" + input + "\" entspricht nicht den Vorgaben");
}