budgeteer/templates/login.html

51 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Login</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link href="/static/css/bootstrap.min.css" rel="stylesheet" />
<link href="/static/css/bootstrap-theme.min.css" rel="stylesheet" />
<link href="/static/css/main.css" rel="stylesheet" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script>
<script src="http://malsup.github.com/jquery.form.js"></script>
<script>
$(document).ready(function() {
$('#invalidCredentials').hide();
$('#loginForm').ajaxForm({
success: function() {
window.location.href = "/api/v1/restricted";
},
error: function() {
$('#invalidCredentials').show();
}
});
});
</script>
</head>
<head><title>Login</title>
<body>
<div class="container" id="head">
Budgeteer
</div>
<div class="container center-block" id="content">
<form id="loginForm" action="/api/v1/login" method="POST">
<label for="username">User</label>
<input type="text" name="username" /><br />
<label for="password">Password</label>
<input type="password" name="password" /><br />
<div id="invalidCredentials">
The entered credentials are invalid
</div>
<input type="submit" value="Login" />
</form>
</div>
</body>
</html>