templates/login.html
$def with (loggedIn=False)
$var title:Login to CSModify
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="page-header text-center">
<img src="static/images/csmodify.png">
</div>
</div>
<div class="col-md-4 col-md-offset-4">
<h2 class="text-center"><span class="glyphicon glyphicon-user"></span> User Login</h2>
<br>
$if loggedIn == True:
<div class="text-center">
<p class="text-center">You have already logged in.</p>
<br>
<a class="btn btn-primary" href="/">Enter</a>
</div>
$else:
<form id="loginForm" action="/login" method="post">
<div class="form-group">
<label for="id">User ID</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input type="text" class="form-control" id="id" name="id" pattern="^[a-zA-Z0-9]+$$" oninput="checkUsername(this)" autofocus required>
</div>
</div>
<div class="form-group">
<label for="password">Password</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input type="password" class="form-control" id="password" name="password" oninput="checkPassword(this)" autocomplete="off" required>
</div>
</div>
<input type="submit" value="Login" class="btn btn-primary">
</form>
<p>Don't have an account yet? Create one <a href="/register">here</a>.</p>
<br>
<br>
</div>
</div>