1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{% extends "website/w_base.html" %}
{% block content %}
{% if with_shop_header %}
{% include "shop/connect_header.html" %}
{% elif COMPANY_LOGO %}
<div style="width:100%; text-align: center">
<img src="{{COMPANY_LOGO}}" alt="{{COMPANY_NAME}}" width=250 />
</div>
{% endif %}
<div id="connect_form_template" style="text-align:center;">
<form method="POST">
<p><input type="text" name="login" placeholder="Email" /></p>
<p>
<input type="password" name="password" placeholder="{{password_placeholder}}" />
{% if password_notice %}
<br/>
<span style="font-size: small;font-style: italic;">{{password_notice}}</span>
{% endif %}
</p>
{% csrf_token %}
<input type="hidden" name="fp" value="" />
<p><button type="submit">Connexion</button></p>
</form>
<p style="color:red;">{{msg}}</p>
{% if permanent_message %}
<div id="permanent_message">
{{permanent_message}}
</div>
{% endif %}
<!--<p><a href="oubli_pass">Mot de passe oublié</a></p>-->
<script>
try {
window.addEventListener("DOMContentLoaded", (event) => {
var fp = document.getElementsByName('fp')
if (fp.length == 1)
fp[0].value = new Fingerprint({canvas: true}).get()
})
} catch (e) {
var msg = 'Ce navigateur ne permet pas de vous identifier. Merci de signaler l\'erreur suivante:\n'
msg += JSON.stringify(e)
alert(msg)
}
</script>
</div>
<script>
// For the members space, reset url to home when accessing connect page
const is_member_space = '{{is_member_space}}';
if (is_member_space === "True") {
var app_env = '{{app_env}}';
var base_location = (app_env === 'dev') ? '/members_space/' : '/';
if (window.location.pathname === base_location) {
history.pushState({}, '', 'home');
} else {
history.replaceState({}, '', 'home');
}
}
</script>
{% endblock %}