Back

Template Source: account/login.html

{% extends "site_base.html" %} {% load i18n %} {% load bootstrap_tags %} {% load ifsetting_tag %} {% load account_tags %} {% load url from future %} {% block head_title %}{% trans "Log In" %}{% endblock %} {% block heading %}{% trans "Log In" %} <small class="lead">{% blocktrans %} If you have an existing account, provide your login credentials below {% endblocktrans %}</small> {% endblock %} {% block signup_banner %}{% endblock %} {% block content %} {% if user.is_authenticated %} {% user_display user as user_display %} <div class="alert alert-info"> <strong>{% trans "Note" %}</strong>: {% blocktrans %}you are already logged in as {{ user_display }}. {% endblocktrans %} </div> {% else %} <section class="well"> <form class="form"> <span class="label">Actions:</span> <a class="btn btn-mini" href="{% url "acct_signup" %}"> {% trans "Sign Up" %}</a> <a class="btn btn-mini" href=""> {% trans "Forgot Password" %}</a> </form> </section> <section> <form method="POST" action="{% url "acct_login" %}" autocapitalize="off" class="form-horizontal"> <legend>{% trans "Log in with an existing account" %}</legend> {% csrf_token %} {{ form|as_bootstrap }} {% if redirect_field_value %} <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/> {% endif %} <div class="form-actions"> <button type="submit" class="btn btn-primary">{% trans "Log in" %} </button> </div> </form> {% ifsetting ACCOUNT_USE_OPENID %} <form action="/openid/register/" method="POST" autocapitalize="off" class="form-horizontal"> <fieldset> <legend>{% trans "Or sign in with your OpenID" %}</legend> {% csrf_token %} <div class="control-group"> <label class="control-label" for="id_username">{% trans "OpenID Identifier" %}</label> <div class="controls"> <input class="openid" type="text" name="openid_url"/> </div> </div> <div class="form-actions"> <input type="submit" value="{% trans "Log in" %}" class="btn btn-primary"/> </div> </fieldset> </form> {% endifsetting %} <p>{% blocktrans %} If you have any trouble logging in to your account, contact us at <a href="mailto:{{ CONTACT_EMAIL }}">{{ CONTACT_EMAIL }}</a>. {% endblocktrans %}</p> {% endif %} </section> {% endblock %} {% block extra_body %} <script> $(document).ready(function() { $("#id_username").focus(); }); </script> {% endblock %}