94 lines
3.9 KiB
HTML
94 lines
3.9 KiB
HTML
{% load i18n authentic2 staticfiles %}
|
|
|
|
<div class="columns small-12 loginform">
|
|
<form method="post" action="">
|
|
{% csrf_token %}
|
|
{% for hidden in form.hidden_fields %}
|
|
{{ hidden }}
|
|
{% endfor %}
|
|
{% if form.errors %}
|
|
<div class="row">
|
|
<div class="columns small-10 small-centered">
|
|
{% for error in form.non_field_errors %}
|
|
<small class="error">{{ error }}</small>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
<div class="row">
|
|
<div class="columns small-10 small-centered">
|
|
<div class="columns small-12 medium-4">{{ form.username.label_tag }}</div>
|
|
<div class="columns small-12 medium-8">
|
|
{{ form.username }}
|
|
{% for error in form.username.errors %}
|
|
<small class="error">{{ error }}</small>
|
|
{% endfor %}
|
|
</div>
|
|
<div class="columns small-12"></div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="columns small-10 small-centered">
|
|
<div class="columns small-12 medium-4">{{ form.password.label_tag }}</div>
|
|
<div class="columns small-12 medium-8">
|
|
{{ form.password }}
|
|
{% for error in form.password.errors %}
|
|
<small class="error">{{ error }}</small>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% if can_reset_password %}
|
|
<div class="columns small-12 text-center">
|
|
<a href="{% url 'password_reset' %}{% if request.GET.next %}?next={{ request.GET.next|urlencode }}{% endif %}">{% trans "Mot de passe oublié ?" %}</a>
|
|
</div>
|
|
{% endif %}
|
|
<div class="columns small-12 text-center">
|
|
<button type="submit" class="submit radius large inverted-button" name="{{ submit_name }}" value="{% trans "Log in" %}"><span class="icon-cadenas"></span> <span class="text">{% trans "SE CONNECTER" %}</span></button>
|
|
<button type="button" class="submit radius large inverted-button" onclick="retour_button()" name="return"><span class="text">{% trans "Retour au site" %}</span></button>
|
|
</div>
|
|
{% comment %}
|
|
{% if cancel %}
|
|
<input type="submit" name="cancel" value="{% trans 'Cancel' %}"/>
|
|
{% endif %}
|
|
{{ form.as_p }}
|
|
{% endcomment %}
|
|
</form>
|
|
|
|
{% comment %}
|
|
<div class="columns small-12 line"></div>
|
|
|
|
<div class="columns small-12 createbox text-center">
|
|
<h4>{% trans "Pas encore inscrit ?" %}</h4>
|
|
<a id="account_create" class="submit white large button radius red-button"><span class="icon-paper"></span> <span class="text">{% trans "CRÉER UN COMPTE" %}</span></a>
|
|
{% comment %}
|
|
{% if registration_authorized %}
|
|
<p>→ {% trans "Not a member?" %} <a href="{{ registration_url }}"{% if request.GET.next %}?next={{ request.GET.next|urlencode }}{% endif %}>{% trans "Register!" %}</a></p>
|
|
{% endif %}
|
|
{% encomment %}
|
|
</div>
|
|
{% endcomment %}
|
|
</div>
|
|
|
|
|
|
{% addtoblock "js-endpage" %}
|
|
{% comment %}<script type="text/javascript" src="{% static "authentic2/js/js_seconds_until.js" %}"></script>{% endcomment %}
|
|
<script type="text/javascript">
|
|
var retour_button = function(eve){
|
|
console.log(eve);
|
|
try {
|
|
var parsed_referrer = new URL(document.referrer);
|
|
if (parsed_referrer.hostname.includes("lesechos")) {
|
|
window.location.href = parsed_referrer.origin;
|
|
} else {
|
|
window.location.href = "http://www.lesechos-solutions.fr";
|
|
}
|
|
} catch(err) {
|
|
window.location.href = "http://www.lesechos-solutions.fr";
|
|
}
|
|
return false;
|
|
}
|
|
</script>
|
|
{% endaddtoblock %}
|