AUTH#1318 - Retour button test

This commit is contained in:
slothy 2015-09-11 15:33:00 +02:00
parent 8cd14b383a
commit f6db4b7520
1 changed files with 4 additions and 2 deletions

View File

@ -46,7 +46,7 @@
{% 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="submit" class="submit radius large inverted-button" onclick="retour_button()" name="return"><span class="text">{% trans "Retour au site" %}</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 %}
@ -75,7 +75,8 @@
{% addtoblock "js-endpage" %}
{% comment %}<script type="text/javascript" src="{% static "authentic2/js/js_seconds_until.js" %}"></script>{% endcomment %}
<script type="text/javascript">
function retour_button(){
var retour_button = function(eve){
console.log(eve);
try {
var parsed_referrer = new URL(document.referrer);
if (parsed_referrer.hostname.includes("lesechos")) {
@ -86,6 +87,7 @@
} catch(err) {
window.location.href = "http://www.lesechos-solutions.fr";
}
return false;
}
</script>
{% endaddtoblock %}