Add form to update user settings

This commit is contained in:
Jannis Portmann 2021-05-01 00:14:57 +02:00
parent c7e261745b
commit 351c4c7dc8

View file

@ -3,7 +3,40 @@
{% block title %}User{% endblock %} {% block title %}User{% endblock %}
{% block body %} {% block body %}
<div class="mb-3"> {% for message in app.flashes('success') %}
<div class="alert alert-success" role="alert">
{{ message }}
</div>
{% endfor %}
<div class="mb-3">
<h1>Hello {{ user.username }}!</p> <h1>Hello {{ user.username }}!</p>
</div> </div>
<div class="mb-3">
<form method="post">
<h3 class="mb-3 font-weight-normal">Change your user data</h3>
<div class="mb-3">
<label for="inputEmail" class="form-label">Email address</label>
<input name="email" type="email" class="form-control" id="inputEmail" aria-describedby="emailHelp" placeholder="{{ app.user.email }}" required>
</div>
<div class="mb-3">
<label for="inputPassword">Password</label>
<input type="password" name="password" id="inputPassword" class="form-control" required>
</div>
<input type="hidden" name="_csrf_token"
value="{{ csrf_token('authenticate') }}"
>
<button class="btn btn-lg btn-primary" type="submit">
Save
</button>
</form>
</div>
<div class="mb-3">
<h3 class="mb-3">Delete Account</h3>
<button class="btn btn-danger">Delete Account</button>
</div>
{% endblock %} {% endblock %}