summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/forgot_password.ejs13
-rw-r--r--views/login.ejs2
-rw-r--r--views/reset_password.ejs14
3 files changed, 29 insertions, 0 deletions
diff --git a/views/forgot_password.ejs b/views/forgot_password.ejs
new file mode 100644
index 0000000..1679496
--- /dev/null
+++ b/views/forgot_password.ejs
@@ -0,0 +1,13 @@
+<%- include('header', { title: "Forgot password" }) %>
+<% if (user) { %>
+<p>
+You're already logged in!
+<% } else { %>
+<form action="/forgot_password" method="post">
+<p>
+<label for="mail">Mail: </label><br>
+<input type="mail" id="mail" name="mail" required>
+<p>
+<button type="submit">Forgot password</button>
+</form>
+<% } %>
diff --git a/views/login.ejs b/views/login.ejs
index a5e2546..b4089fc 100644
--- a/views/login.ejs
+++ b/views/login.ejs
@@ -12,4 +12,6 @@
<p>
<button type="submit">Login</button>
</form>
+<p>
+<a href="/forgot_password">Forgot password</a>
<% } %>
diff --git a/views/reset_password.ejs b/views/reset_password.ejs
new file mode 100644
index 0000000..8920da7
--- /dev/null
+++ b/views/reset_password.ejs
@@ -0,0 +1,14 @@
+<%- include('header', { title: "Reset password" }) %>
+<form action="/reset_password" method="post">
+<p>
+<label for="mail">Mail: </label><br>
+<input type="text" id="mail" name="mail" size="32" value="<%= mail %>" required>
+<p>
+<label for="password">New Password: </label><br>
+<input type="password" id="password" name="password" size="32" required>
+<p>
+<label for="token">Token: </label><br>
+<input type="text" id="token" name="token" size="32" value="<%= token %>" style="font-family:monospace" required>
+<p>
+<button type="submit">Reset password</button>
+</form>