You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.3 KiB
43 lines
1.3 KiB
{% include 'include/header.html' %}
|
|
<title>Login Methods</title>
|
|
<script type="text/javascript">
|
|
$("document").ready(function() {
|
|
$('#loginAction').click(function(){
|
|
email = $("#email").val();
|
|
password = $("#passwd").val();
|
|
$.post("/auth/login",{ email:email, passwd:password},function(data){
|
|
if (data == 'error') {
|
|
$('#loginstatus').replaceWith("Invalid Login Credentials.");
|
|
return;
|
|
}
|
|
$( location ).attr("href", data);
|
|
});
|
|
});
|
|
$('#registerAction').click(function(){
|
|
email = $("#email").val();
|
|
password = $("#passwd").val();
|
|
$.post("/auth/register",{ email:email, passwd:password},function(data){
|
|
$('#loginstatus').replaceWith(data);
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
</head>
|
|
{% include 'include/navblock.html' %}
|
|
<div id='loginbody'>
|
|
<h1>Login</h1>
|
|
<div id='loginForm'>
|
|
<form name='localLoginForm' method="post" action="/auth/login">
|
|
<table>
|
|
<tr><td>Email:</td><td><input id='email' type="email" /></td></tr>
|
|
<tr><td>Password:</td><td><input id='passwd' type="password" /></td></tr>
|
|
<tr>
|
|
<td><input type="button" id="loginAction" value="Log In" /></td>
|
|
<td><input type="button" id="registerAction" value="Register" /></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
<div id='loginstatus'></div>
|
|
</div>
|
|
</div>
|
|
{% include 'include/footer.html' %}
|
|
|