40 lines
1.3 KiB
HTML
40 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de" xmlns:th="http://thymeleaf.org">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Abizeitung 2020/2021 Voting</title>
|
|
<link th:href="@{/styles/start.css}" rel="stylesheet" />
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<script>
|
|
window.addEventListener("load", function() {
|
|
document.getElementById("signup_button").addEventListener("click", test);
|
|
});
|
|
|
|
function test() {
|
|
let input_field = document.getElementById("email_input");
|
|
let input = input_field.value;
|
|
if (!input.trim().match("[a-z]+\\.[a-z]+@adolfinum+\\.de$")) {
|
|
input_field.value = "";
|
|
alert("Die Email-Adresse \"" + input + "\" entspricht nicht den Vorgaben");
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<div class="userLogin">
|
|
<form action="#" th:action="@{/checkStatus}" method="post">
|
|
<label for="email_input">
|
|
<span class="label-text">Adolfinum E-Mail</span>
|
|
</label>
|
|
<input class="email_input" id="email_input" type="text" placeholder="name.nachname@adolfinum.de" name="name" required autofocus />
|
|
<p></p>
|
|
<button type="submit" id="signup_button">Abstimmen</button>
|
|
</form>
|
|
</div>
|
|
</body>
|
|
|
|
</html> |