Siobhan Tully | cf04fb6 | 2014-01-11 11:25:57 -0500 | [diff] [blame] | 1 | {% extends "admin/base_site_login.html" %} |
| 2 | {% load i18n admin_static %} |
| 3 | |
| 4 | {% block extrastyle %}{{ block.super }} |
| 5 | <link rel="stylesheet" type="text/css" href="/static/suit/bootstrap/css/bootstrap.min.css" media="all"/> |
| 6 | <link rel="stylesheet" type="text/css" href="{% static "planetstack.css" %}" /> |
| 7 | {% endblock %} |
| 8 | |
| 9 | {% block bodyclass %}login{% endblock %} |
| 10 | |
| 11 | {% block nav-global %}{% endblock %} |
| 12 | |
| 13 | {% block content_title %}{% endblock %} |
| 14 | |
| 15 | {% block breadcrumbs %}{% endblock %} |
| 16 | |
| 17 | {% block content %} |
| 18 | {% if form.errors and not form.non_field_errors and not form.this_is_the_login_form.errors %} |
| 19 | <p class="errornote"> |
| 20 | {% blocktrans count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %} |
| 21 | </p> |
| 22 | {% endif %} |
| 23 | |
| 24 | {% if form.non_field_errors or form.this_is_the_login_form.errors %} |
| 25 | {% for error in form.non_field_errors|add:form.this_is_the_login_form.errors %} |
| 26 | <p class="errornote"> |
| 27 | {{ error }} |
| 28 | </p> |
| 29 | {% endfor %} |
| 30 | {% endif %} |
| 31 | <div id="wrap"> |
| 32 | <div id="content-main"> |
| 33 | <h1><i class="icon-lock icon-white"></i> OpenCloud</h1> |
| 34 | <form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %} |
| 35 | <div class="form-row"> |
| 36 | {% if not form.this_is_the_login_form.errors %}{{ form.username.errors }}{% endif %} |
| 37 | {{ form.username }} |
| 38 | </div> |
| 39 | <div class="form-row"> |
| 40 | {% if not form.this_is_the_login_form.errors %}{{ form.password.errors }}{% endif %} |
| 41 | {{ form.password }} |
| 42 | <input type="hidden" name="this_is_the_login_form" value="1" /> |
| 43 | <input type="hidden" name="next" value="{{ next }}" /> |
| 44 | </div> |
| 45 | {% url 'admin_password_reset' as password_reset_url %} |
| 46 | {% if password_reset_url %} |
| 47 | <div class="password-reset-link"> |
| 48 | <a href="{{ password_reset_url }}">{% trans 'Forgotten your password or username?' %}</a> |
| 49 | </div> |
| 50 | {% endif %} |
| 51 | <div class="submit-row"> |
| 52 | <input type="submit" class="btn btn-info" value="{% trans 'SIGN IN' %}" /> |
| 53 | </div> |
| 54 | |
| 55 | <div class="forgotLink"><a href="{{ password_reset_url }}">{% trans 'Forgot password?' %}</a></div><div class="createAccountLink"><a href="#">{% trans 'Create an Account' %}</a></div> |
| 56 | </form> |
| 57 | |
| 58 | <script type="text/javascript"> |
| 59 | document.getElementById('id_username').focus() |
| 60 | </script> |
| 61 | </div> |
| 62 | </div> |
| 63 | {% endblock %} |