45 lines
1.5 KiB
HTML
45 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<link rel="icon" type="image/x-icon" href="/img/favicon.ico">
|
|
<link rel="stylesheet" href="css/login.css">
|
|
<style>
|
|
html {
|
|
background-color: #16c02d;
|
|
};
|
|
input {
|
|
background-color: #000000;
|
|
};
|
|
</style>
|
|
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
|
|
<script>
|
|
function register(login, password){
|
|
$.ajax({
|
|
method: "POST",
|
|
url: "/api/register",
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify({"login": login, "password": password}),
|
|
success: function(data, textStatus, jQxhr){
|
|
location="/login.html";
|
|
},
|
|
error: function( jqXhr, textStatus, errorThrown ){
|
|
document.cookie = "";
|
|
alert("Register error");
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
<div class="wrapper fadeInDown">
|
|
<div id="formContent">
|
|
<!-- Tabs Titles -->
|
|
<h2> <a href="login.html">Sign In</a></h2>
|
|
<h2 class="active">Sign Up</h2>
|
|
<!-- Login Form -->
|
|
<form>
|
|
<input type="text" id="login" class="fadeIn second" name="login" placeholder="login">
|
|
<input type="password" id="password" class="fadeIn third" name="login" placeholder="password">
|
|
<input type="button" class="fadeIn fourth" value="Register" onclick="register(document.getElementById('login').value,
|
|
document.getElementById('password').value)">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</html> |