summaryrefslogtreecommitdiff
path: root/views/login.ejs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--views/login.ejs23
1 files changed, 23 insertions, 0 deletions
diff --git a/views/login.ejs b/views/login.ejs
new file mode 100644
index 0000000..e1178d7
--- /dev/null
+++ b/views/login.ejs
@@ -0,0 +1,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") %>