AUTH#1318 - Retour button
This commit is contained in:
parent
050e37b0f6
commit
690907d617
|
@ -46,6 +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="icon-cadenas"></span> <span class="text">{% trans "Raetour au site" %}</span></button>
|
||||
</div>
|
||||
{% comment %}
|
||||
{% if cancel %}
|
||||
|
@ -73,4 +74,18 @@
|
|||
|
||||
{% addtoblock "js-endpage" %}
|
||||
<script type="text/javascript" src="{% static "authentic2/js/js_seconds_until.js" %}"></script>
|
||||
<script type="text/javascript">
|
||||
function retour_button(){
|
||||
try {
|
||||
var parsed_referrer = new URL(document.referrer);
|
||||
if (parsed_referrer.hostname.includes("lesechos")) {
|
||||
document.location = parsed_referrer.origin;
|
||||
} else {
|
||||
document.location = "http://www.lesechos-solutions.fr";
|
||||
}
|
||||
} catch(err) {
|
||||
document.location = "http://www.lesechos-solutions.fr";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{% endaddtoblock %}
|
||||
|
|
Reference in New Issue