2018-01-28 14:16:52 +00:00
|
|
|
<!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 -->
|
|
|
|
<title>{{ login.Title }}</title>
|
|
|
|
|
|
|
|
<!-- Bootstrap -->
|
2019-04-15 23:38:03 +00:00
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/css/bootstrap.min.css"
|
|
|
|
integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous">
|
2018-01-28 14:16:52 +00:00
|
|
|
|
|
|
|
<style>
|
|
|
|
html, body, .container, .row { height: 100%; }
|
|
|
|
.vertical-align { display: flex; flex-direction: column; justify-content: center; }
|
|
|
|
.modal-content { background-color: darkcyan; }
|
|
|
|
.modal-heading h2 { color: white; }
|
|
|
|
.nav-tabs>li>a { color: white; }
|
|
|
|
.nav-tabs>li.active>a, .nav-tabs>li>a:hover { color: #333; }
|
|
|
|
.tab-pane { padding-top: 10px; color: white; }
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="container">
|
|
|
|
|
|
|
|
<div class="row vertical-align">
|
|
|
|
<div class="col-md-offset-2 col-md-8">
|
|
|
|
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-heading">
|
|
|
|
<h2 class="text-center">{{ login.Title }}</h2>
|
|
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<div class="modal-body">
|
|
|
|
|
|
|
|
<!-- Nav tabs -->
|
|
|
|
{% if active_methods | length > 1 %}
|
|
|
|
<ul class="nav nav-tabs" role="tablist">
|
|
|
|
{% for method in active_methods sorted %}
|
|
|
|
<li role="presentation" class="{% if method == login.DefaultMethod %}active{% endif %}">
|
|
|
|
{% for name, desc in login.Names %}{% if method == name %}
|
|
|
|
<a href="#{{ method }}" aria-controls="{{ method }}" role="tab" data-toggle="tab">{{ desc }}</a>
|
|
|
|
{% endif %}{% endfor %}
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<!-- Tab panes -->
|
|
|
|
<div class="tab-content">
|
|
|
|
{% for method, fields in active_methods sorted %}
|
|
|
|
<div role="tabpanel" class="tab-pane {% if method == login.DefaultMethod %}active{% endif %}" id="{{ method }}">
|
|
|
|
<form action="/login" method="post">
|
|
|
|
{% for field in fields %}
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="{{ method }}-{{ field.Name }}">{{ field.Label }}</label>
|
|
|
|
<input type="{{ field.Type }}" class="form-control" placeholder="{{ field.Placeholder }}"
|
|
|
|
name="{{ method }}-{{ field.Name }}" id="{{ method }}-{{ field.Name }}" />
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
<div class="form-group text-center">
|
|
|
|
<button type="submit" class="btn btn-success btn-lg">Login</button>
|
|
|
|
<input type="hidden" name="go" value="{{ go }}">
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div> <!-- /.panel-body -->
|
|
|
|
</div> <!-- /.modal-content -->
|
|
|
|
</div> <!-- /.modal-dialog -->
|
|
|
|
|
|
|
|
</div> <!-- /.col-md-8 -->
|
|
|
|
</div> <!-- /.row -->
|
|
|
|
|
|
|
|
</div> <!-- /.container -->
|
|
|
|
|
|
|
|
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
2019-04-15 23:38:03 +00:00
|
|
|
<script src="https://cdn.jsdelivr.net/npm/jquery@3.4.0/dist/jquery.min.js"
|
|
|
|
integrity="sha256-BJeo0qm959uMBGb65z40ejJYGSgR7REI4+CW1fNKwOg=" crossorigin="anonymous"></script>
|
2018-01-28 14:16:52 +00:00
|
|
|
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
2019-04-15 23:38:03 +00:00
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/js/bootstrap.min.js"
|
|
|
|
integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
|
2018-01-28 14:16:52 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
|
|
|
$(e.target.hash).find('input:first').focus();
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|