Modify Login-Register-System
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
<!--
|
||||
* @overview Life of German Reallife - Login Login login.html
|
||||
* @author Orangebox, VegaZ
|
||||
* @author Orangebox, hydrant, VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<script src="Dependences/jquery-3.3.1.min.js"></script>
|
||||
<script src="Dependences/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -22,7 +20,7 @@
|
||||
<div class="register-form form-l">
|
||||
<input type="password" placeholder="Passwort" id="passwordInputRegister" />
|
||||
<input type="password" placeholder="Passwort wiederholen" id="passwordRepeatInputRegister" />
|
||||
<button id="registerBtn">Erstellen</button><br /><br />
|
||||
<button id="registerBtn">Registrieren</button><br /><br />
|
||||
<button class="quitBtn">Server verlassen</button>
|
||||
<p class="message">Bereits registriert? <a href="#">Logg dich ein</a></p>
|
||||
</div>
|
||||
@@ -34,63 +32,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function () {
|
||||
resourceCall("RequestDisplayname");
|
||||
});
|
||||
|
||||
$('.message a').click(function () {
|
||||
$('.form-l').animate({ height: "toggle", opacity: "toggle" }, "slow");
|
||||
});
|
||||
|
||||
$('#registerBtn').click(function () {
|
||||
var password = $('#passwordInputRegister').val();
|
||||
var passwordRepeat = $('#passwordRepeatInputRegister').val();
|
||||
|
||||
if (password === "" || passwordRepeat === "") {
|
||||
showError("Mindestens ein Passwort Feld ist leer!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (password !== passwordRepeat) {
|
||||
showError("Die beiden Passwörter stimmen nicht überein!")
|
||||
return;
|
||||
}
|
||||
|
||||
if (password.length < 8 || passwordRepeat.length < 8) {
|
||||
showError("Das Passwort muss mindestens 8 Zeichen lang sein");
|
||||
return;
|
||||
}
|
||||
|
||||
resourceCall("Register", password, passwordRepeat);
|
||||
});
|
||||
|
||||
$('#loginBtn').click(function () {
|
||||
var password = $('#passwordInputLogin').val();
|
||||
|
||||
if (password === "") {
|
||||
showError("Du musst ein Passwort angeben!");
|
||||
return;
|
||||
}
|
||||
|
||||
resourceCall("Login", password);
|
||||
});
|
||||
|
||||
$('.quitBtn').click(function () {
|
||||
resourceCall("Quit");
|
||||
});
|
||||
|
||||
function showError(error) {
|
||||
$('.isa_error').html(error);
|
||||
$('.isa_error').slideDown();
|
||||
}
|
||||
|
||||
function SendDisplayname(name) {
|
||||
$("h2#playerName").text(name);
|
||||
}
|
||||
</script>
|
||||
<script src="Dependences/jquery-3.3.1.min.js"></script>
|
||||
<script src="Dependences/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="login.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user