diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/change_mail.ejs | 12 | ||||
-rw-r--r-- | views/change_name.ejs | 12 | ||||
-rw-r--r-- | views/profile.ejs | 15 |
3 files changed, 31 insertions, 8 deletions
diff --git a/views/change_mail.ejs b/views/change_mail.ejs new file mode 100644 index 0000000..6c3ed62 --- /dev/null +++ b/views/change_mail.ejs @@ -0,0 +1,12 @@ +<%- include('header', { title: "Change mail address" }) %> +<form action="/change_mail" method="post"> +<p> +Name: <%= user.name %> +<p> +Mail: <%= user.mail %> +<p> +<label for="newmail">New mail address: </label><br> +<input type="newmail" id="newmail" name="newmail" required> +<p> +<button type="submit">Change mail</button> +</form> diff --git a/views/change_name.ejs b/views/change_name.ejs new file mode 100644 index 0000000..eac508f --- /dev/null +++ b/views/change_name.ejs @@ -0,0 +1,12 @@ +<%- include('header', { title: "Change name" }) %> +<form action="/change_name" method="post"> +<p> +Name: <%= user.name %> +<p> +Mail: <%= user.mail %> +<p> +<label for="newname">New name: </label><br> +<input type="newname" id="newname" name="newname" required> +<p> +<button type="submit">Change name</button> +</form> diff --git a/views/profile.ejs b/views/profile.ejs index 7829870..74843f3 100644 --- a/views/profile.ejs +++ b/views/profile.ejs @@ -12,20 +12,19 @@ Your mail address is <%= user.mail %>. <br clear=left> -<p> -<% +<ul style="list-style:'\bb '"> +<li><% if (user.notifications) { %><a href="/unsubscribe">Disable mail notifications</a><% } else { %><a href="/subscribe">Enable mail notifications</a><% } %> - -<p> -<a href="/change_password">Change password</a> - -<p> -<a href="/logout">Logout</a> +<li><a href="/change_password">Change password</a> +<li><a href="/change_mail">Change mail address</a> +<li><a href="/change_name">Change name</a> +<li><a href="/logout">Logout</a> +</ul> <% if (open_games.length > 0) { %> <h2>Open Games</h2> |