diff options
author | Julien Dessaux | 2022-10-27 23:56:29 +0200 |
---|---|---|
committer | Julien Dessaux | 2022-10-27 23:56:29 +0200 |
commit | 2611ded920a8345922346ed0d43e4efdd94401a1 (patch) | |
tree | 3313d976fbb11bdbfd1841ce336cc4372f9ab32c /views/login.ejs | |
parent | Allow for placing the first word (diff) | |
download | jeux-de-mots-2611ded920a8345922346ed0d43e4efdd94401a1.tar.gz jeux-de-mots-2611ded920a8345922346ed0d43e4efdd94401a1.tar.bz2 jeux-de-mots-2611ded920a8345922346ed0d43e4efdd94401a1.zip |
Began implementing middlewares, session and auth
Diffstat (limited to 'views/login.ejs')
-rw-r--r-- | views/login.ejs | 23 |
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") %> |