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