{% extends "admin/login.html" %}
{% load i18n static %}

{% block content_title %}<a href="https://github.com/jedie/django-secure-js-login">Secure-JS-Login:</a>{% endblock %}

{% block extrahead %}
<style>
form {
    /* acticated via JavaScript */
    display:none;
}
</style>
<script type="text/javascript">
var DEBUG={{ DEBUG }};
var challenge="{{ challenge }}";
var CHALLENGE_LENGTH={{ CHALLENGE_LENGTH }};
var NONCE_LENGTH={{ NONCE_LENGTH }};
var SALT_LENGTH={{ SALT_LENGTH }};
var PBKDF2_BYTE_LENGTH={{ PBKDF2_BYTE_LENGTH }};
var ITERATIONS1={{ ITERATIONS1 }};
var ITERATIONS2={{ ITERATIONS2 }};
var CSRF_COOKIE_NAME="{{ CSRF_COOKIE_NAME }}";

var get_salt_url="{% url 'secure-js-login:get_salt' %}";
var ID_FORM="#login-form";
var ID_USERNAME="#id_username";
var ID_PASSWORD="#id_password";
</script>
<script type="text/javascript" src="{% static 'admin/js/jquery.min.js' %}" onerror="JavaScript:alert('Error loading file ['+this.src+'] !');"></script>
<script type="text/javascript" src="{% url 'django.views.i18n.javascript_catalog' packages='auth' %}" onerror="JavaScript:alert('Error loading file ['+this.src+'] !');"></script>
<script type="text/javascript" src="{% static 'secure_js_login/sha.js' %}" onerror="JavaScript:alert('Error loading file ['+this.src+'] !');"></script>
<script type="text/javascript" src="{% static 'secure_js_login/pbkdf2.js' %}" onerror="JavaScript:alert('Error loading file ['+this.src+'] !');"></script>
<script type="text/javascript" src="{% static 'secure_js_login/secure_js_login.js' %}" onerror="JavaScript:alert('Error loading file ['+this.src+'] !');"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
    init_secure_login();
});
</script>
{% endblock extrahead %}

{% block content %}
<noscript><p class="errornote">Please enable JavaScript!</p></noscript>
{{ block.super }}
{% endblock content %}