make all this have a login page, use ldap, put a logo on, moved some upstream stuff to static/ -- need to do more here to be consistent with bootstrap 5, but for another day
This commit is contained in:
66
templates/login.html
Normal file
66
templates/login.html
Normal file
@@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Book DB Login</title>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="Photo Assistant">
|
||||
|
||||
<!-- Bootstrap CSS -->
|
||||
<link rel="stylesheet" href="{{ url_for( 'static', filename='upstream/bootstrap-5.0.2-dist/css/bootstrap.min.css' ) }}">
|
||||
|
||||
<!-- code to get bootstrap to work -->
|
||||
<script src="{{ url_for( 'static', filename='upstream/jquery-3.6.0.min.js')}}"></script>
|
||||
<script src="{{ url_for( 'static', filename='upstream/bootstrap-5.0.2-dist/js/bootstrap.min.js')}}"></script>
|
||||
|
||||
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
||||
|
||||
{% import "bootstrap/wtf.html" as wtf %}
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
{% if form.errors|length > 0 %}
|
||||
<div class="row my-5">
|
||||
<alert id="err" class="alert alert-danger alert-dismissible fade show">
|
||||
<button type="button" class="close btn border-secondary me-3" data-dismiss="alert" aria-label="Close" onClick="$('#err').hide()">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
{% set last_err = namespace(txt="") %}
|
||||
{% for e in form.errors %}
|
||||
{% if last_err.txt != form.errors[e] %}
|
||||
{% set err = form.errors[e]|replace("['", "" ) %}
|
||||
{% set err = err|replace("']", "" ) %}
|
||||
{{err}}
|
||||
{% set last_err.txt=form.errors[e] %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</alert>
|
||||
</div class="row">
|
||||
{% endif %}
|
||||
|
||||
<div class="row px-3 my-5 col-6" style="border: 3px solid #5bc0de; border-radius: 15px;">
|
||||
<h3 class="my-3 text-center" style="color: #5bc0de">
|
||||
<svg width="64" height="64" fill="currentColor"><use xlink:href="{{url_for('static', filename='book.svg')}}#logo" /></svg> Book DB Login</h3>
|
||||
<form class="" method="POST">
|
||||
<div class="input-group">
|
||||
<label for="username" class="text-right input-group-text col-4 text-info">Username:</label>
|
||||
<input class="form-control" type="text" id="username" name="username"></input>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<label for="password" class="text-right input-group-text col-4 text-info">Password:</label>
|
||||
<input class="form-control col-8" type="password" id="password" name="password"></input>
|
||||
</div>
|
||||
|
||||
<div class="col-12 my-2 text-center">
|
||||
{{ form.submit( class="form-control text-info") }}
|
||||
</div>
|
||||
{{ form.hidden_tag() }}
|
||||
</form>
|
||||
</div class="row">
|
||||
</div class="container">
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user