{% extends "registration/registration_base.html" %} {% load i18n %} {% load ndf_tags %} {% block title %}{% trans "Login" %}{% endblock %} {% block style %} {{block.super}} label, small.all-error { font-size: 15px; } /* Setting css-properties for small.error */ small.error { padding: 0 0 0 0.5rem !important; margin-top: 0rem !important; position: relative !important; } {% endblock %} {% block body_content %} {% url 'auth_password_reset' as auth_pwd_reset_url %} {% url 'registration_register' as register_url %}

{% trans "Log In" %}


{% if form.errors %} {% trans "Either your email or password is incorrect !" %} {% endif %}
{% csrf_token %}
{{ form.username }}
{{ form.password }}
{% get_is_captcha_visible as is_captcha %} {% if is_captcha %}
{% include "ndf/Captcha.html" %}
{% endif %}
{# {% if site.SITE_NAME != "NROER" %} #} {# {% endif %} #}
{% endblock %} {% block document_ready %} {{block.super}} // Setting tabindex for following html elements $("#id_username").attr("tabindex", "1"); $("#id_password").attr("tabindex", "2"); $("a[title='Recover your password']").attr("tabindex", "5"); $("a[title='Click here to register']").attr("tabindex", "6"); $("input[id='id_username'], input[id='id_password']").each(function(){ $(this).attr("required", ""); $(this).after("Please fill valid "+this.name+""); }); //Code to refresh the Captcha $('.js-captcha-refresh').click(function(){ $form = $(this).parents('form'); $.getJSON($(this).data('url'), {}, function(json) { // This should update your captcha image src and captcha hidden input }); return false; }); {% endblock %}