71 lines
2.8 KiB
Smarty
71 lines
2.8 KiB
Smarty
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
|
<meta name="description" content="">
|
|
<meta name="author" content="">
|
|
<link rel="icon" href="/static/img/favicon.ico">
|
|
|
|
<title>Login</title>
|
|
|
|
<!-- Bootstrap core CSS -->
|
|
<link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
|
|
|
<!-- Custom styles for this template -->
|
|
<link href="/static/css/signin.css" rel="stylesheet">
|
|
|
|
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
|
<!--[if lt IE 9]>
|
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
|
<![endif]-->
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="container">
|
|
|
|
<form id="loginForm" class="form-signin" action="/login" method="POST">
|
|
<h2 class="form-signin-heading">Login</h2>
|
|
<label for="inputEmail" class="sr-only">Email address</label>
|
|
<input name="token" type="hidden" id="token-value" value="" />
|
|
<input id="inputLogin" name="login" class="form-control" placeholder="Login" required autofocus />
|
|
<label for="inputPassword" class="sr-only">Password</label>
|
|
<input type="password" id="inputPassword" name="password" class="form-control" placeholder="Password" />
|
|
<!-- <div class="checkbox">
|
|
<label>
|
|
<input type="checkbox" value="remember-me"> Remember me
|
|
</label>
|
|
</div> -->
|
|
<center><p id="token-value-txt"></p></center>
|
|
<button class="btn btn-lg btn-primary btn-block" type="submit">Laisse moi entrer</button>
|
|
</form>
|
|
|
|
</div> <!-- /container -->
|
|
|
|
|
|
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
|
<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
|
|
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
|
<script src="/static/js/jquery.sha256.min.js"></script>
|
|
<script type="application/javascript">
|
|
var rand = function() {
|
|
return Math.random().toString(36).substr(2);
|
|
}
|
|
$("form").attr('action', window.location.pathname);
|
|
$("#loginForm").submit(function() {
|
|
var token = Math.random().toString(36).substr(2);
|
|
$('#token-value').val(token);
|
|
$('#token-value-txt').text("Token: "+token);
|
|
$('#inputPassword').val($.sha256($('#inputPassword').val()));
|
|
console.log("Password: "+$('#inputPassword').val());
|
|
return true;
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|