Profile edit (WIP)

This commit is contained in:
Greg Burri 2024-11-15 14:47:10 +01:00
parent 405aa68526
commit 327b2d0a5b
15 changed files with 174 additions and 46 deletions

View file

@ -4,7 +4,7 @@
<div class="content">
<form action="/ask_reset_password" method="post">
<label for="email_field">Your email address</label>
<input id="email_field" type="text" name="email" value="{{ email }}" autocapitalize="none" autocomplete="email" autofocus="autofocus" />
<input id="email_field" type="email" name="email" value="{{ email }}" autocapitalize="none" autocomplete="email" autofocus="autofocus" />
{{ message_email }}
<input type="submit" name="commit" value="Ask reset" />

View file

@ -1,13 +1,35 @@
{% extends "base_with_list.html" %}
{% extends "base_with_header.html" %}
{% block main_container %}
<h2>Profile</h2>
{% match user %}
{% when Some with (user) %}
<div id="user-edit">
<label for="title_field">Name</label>
<input
id="name_field"
type="text"
name="name"
value="{{ user.name }}"
autocapitalize="none"
autocomplete="title"
autofocus="autofocus" />
<label for="password_field_1">New password (minimum 8 characters)</label>
<input id="password_field_1" type="password" name="password_1" />
<label for="password_field_1">Re-enter password</label>
<input id="password_field_2" type="password" name="password_2" />
<button class="button" typed="button">Save</button>
</div>
{% when None %}
{% endmatch %}
{% block content %}
<label for="title_field">Name</label>
<input
id="name_field"
type="text"
name="name"
value="{{ user.name }}"
autocapitalize="none"
autocomplete="title"
autofocus="autofocus" />
{% endblock %}

View file

@ -4,7 +4,7 @@
<div class="content">
<form action="/signin" method="post">
<label for="email_field">Email address</label>
<input id="email_field" type="text" name="email" value="{{ email }}" autocapitalize="none" autocomplete="email" autofocus="autofocus" />
<input id="email_field" type="email" name="email" value="{{ email }}" autocapitalize="none" autocomplete="email" autofocus="autofocus" />
<label for="password_field">Password</label>
<input id="password_field" type="password" name="password" autocomplete="current-password" />

View file

@ -4,7 +4,7 @@
<div class="content">
<form action="/signup" method="post">
<label for="email_field">Your email address</label>
<input id="email_field" type="text" name="email" value="{{ email }}" autocapitalize="none" autocomplete="email" autofocus="autofocus" />
<input id="email_field" type="email" name="email" value="{{ email }}" autocapitalize="none" autocomplete="email" autofocus="autofocus" />
{{ message_email }}
<label for="password_field_1">Choose a password (minimum 8 characters)</label>