snipt/templates/registration/login.html

69 lines
2.6 KiB
HTML

{% extends "registration/registration_base.html" %}
{% block page-title %}Log in - {{ block.super }}{% endblock %}
{% block body-class %}{{ block.super }} static login{% endblock %}
{% block content %}
<form class="form-horizontal static-box" method="post" action="{% url 'login' %}">
{% if request.GET.activationcomplete %}
<div class="alert alert-success">
Successfully confirmed email! Log in below.
</div>
{% endif %}
{% if form.errors %}
{% if form.non_field_errors %}
<div class="alert alert-error">
{{ form.non_field_errors }}
</div>
{% else %}
<div class="alert alert-error">
Please fix the errors below.
</div>
{% endif %}
{% endif %}
<fieldset>
<legend>Log in</legend>
<div class="control-group {% if form.username.errors %}error{% endif %}">
<label class="control-label" for="id_username">Username or email:</label>
<div class="controls">
{{ form.username }}
{% if form.errors.username %}
<span class="help-inline">
{% for error in form.errors.username %}
{{ error }}
{% endfor %}
</span>
{% endif %}
</div>
</div>
<div class="control-group {% if form.password.errors %}error{% endif %}">
<label class="control-label" for="id_password">Password</label>
<div class="controls">
{{ form.password }}
{% if form.errors.password %}
<span class="help-inline">
{% for error in form.errors.password %}
{{ error }}
{% endfor %}
</span>
{% endif %}
</div>
</div>
<div class="form-actions group">
<a class="btn pull-right" href="/signup/">Sign up</a>
<a class="btn pull-right" href="{% url 'auth_password_reset' %}">Reset password</a>
<button class="btn btn-primary" type="submit">Log in</button>
</div>
</fieldset>
<input type="hidden" name="next" value="{{ next }}" />
{% csrf_token %}
</form>
{% endblock %}
{% block analytics %}
{% if not debug %}
window.ll('tagScreen', 'Login view');
{% endif %}
{% endblock %}