blob: e1178d73ab1fad27a889e39ca50c2efc8eb242e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<%- include("header") %>
<form action="/login" method="post">
<% if (Object.keys(errors).length === 0) { %>
<h2>Connexion:</h2>
<% } else { %>
<h2>Oops, erreur de connexion!</h2>
<% } %>
<div class="form-field<%= errors.username ? ' form-field-invalid' : '' %>">
<input type="text" placeholder="Identifiant" name="username" value="<%= data.username %>" required autofocus>
<% if (errors.username) { %>
<label class="error" for="username"><%= errors.username.msg %></label>
<% } %>
</div>
<div class="form-field<%= errors.password ? ' form-field-invalid' : '' %>">
<input type="password" placeholder="Mot de passe" name="password" value="<%= data.password %>" required>
<% if (errors.password) { %>
<label class="error" for="password"><%= errors.password.msg %></label>
<% } %>
</div>
<button type="submit">Connexion</button>
</form>
<!-- TODO forgot password link -->
<%- include("footer") %>
|