55 lines
1.6 KiB
HTML
55 lines
1.6 KiB
HTML
{% extends 'lemoncurry/layout.html' %}
|
|
{% load lemonauth_tags static %}
|
|
{% block title %}log in ~ {{ block.super }}{% endblock %}
|
|
|
|
{% block styles %}
|
|
<link rel="stylesheet" type="text/stylus" href="{% static 'lemonauth/css/login.styl' %}" />
|
|
{% endblock %}
|
|
|
|
{% block main %}
|
|
<div class="container">
|
|
{% if form.errors %}
|
|
<p class="alert alert-danger">
|
|
<strong>Uh oh!</strong> Your username and password didn't match. Please try again.
|
|
</p>
|
|
{% endif %}
|
|
|
|
{% if next %}
|
|
{% if user.is_authenticated %}
|
|
<p class="alert alert-warning">
|
|
<strong>Hang on!</strong> Your account doesn't have access to this page. To proceed, please log in to an account that does have access.
|
|
</p>
|
|
{% else %}
|
|
<p class="alert alert-warning">
|
|
<strong>Oops!</strong> Please log in to see this page.
|
|
</p>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
<form class="card" method="post" action="{% url 'lemonauth:login' %}">
|
|
<div class="card-body">
|
|
{% form_field form.username %}
|
|
{% form_field form.password %}
|
|
{% form_field form.otp_token %}
|
|
|
|
<div class="form-group">
|
|
<label class="custom-control custom-checkbox">
|
|
<input name="{{ form.otp_agent_trust.name }}" class="custom-control-input" type="checkbox" />
|
|
<span class="custom-control-indicator"></span>
|
|
<span class="custom-control-description">remember this browser (don't tick this on a public computer!)</span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card-footer">
|
|
<button class="btn btn-primary" type="submit">
|
|
<i class="fa fa-sign-in"></i>
|
|
log in
|
|
</button>
|
|
</div>
|
|
|
|
{% csrf_token %}
|
|
<input type="hidden" name="next" value="{{ next }}" />
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|