Schafkopf-Server/Public/reset.html

43 lines
1.4 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'/>
<title>Schafkopf</title>
<meta name='viewport' content='width=device-width, initial-scale=1'/>
<link rel='stylesheet' type='text/css' href='style.css'/>
<link rel='stylesheet' type='text/css' href='login.css'/>
<script src='api.js'></script>
<script src='login.js'></script>
</head>
<body>
<div id="login-window">
<div id="login-window-vertical-center">
<div id="login-window-inner">
<div id="sheephead-logo">\_______/<br>\ - - /<br>\ | /<br>\_/<br><br>Sheephead</div>
<label for="usrname">Username</span><a href="login.html">Log in instead</a></label>
<input type="text" id="user-name" name="usrname" required/>
<button class="login-buttons standard-button" onclick="resetPassword()">Send recovery email</button>
<div id="user-hint"></div>
</div>
</div>
</div>
<script>
function resetPassword() {
const name = getLoginName()
if (name == "") {
setTextHint("Please enter a name")
return
}
performRecoveryEmailRequest(name)
.then(function(value) {
setTextHint("The email has been sent")
})
.catch(setTextHint)
}
</script>
</body>
</html>