User details
Added a user details page and the ability to update display name and password
This commit is contained in:
parent
76d43d57d9
commit
fd1742ec38
4 changed files with 91 additions and 3 deletions
33
flask/templates/user.html
Normal file
33
flask/templates/user.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block meta %}
|
||||
<link rel="stylesheet" href="/static/user.css" />
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="grid-container">
|
||||
<b>Display Name: </b>
|
||||
<span>
|
||||
{{userdata[2]}}
|
||||
{% if userdata[0] == login_userid %}
|
||||
<form action="/user/{{userdata[0]}}" method="post"><input type="hidden" name="edit-type" value="dname"><input type="text" name="display-name" placeholder="Edit Display Name"> <input type="submit" value="Edit"></form>
|
||||
{% endif %}
|
||||
</span>
|
||||
<b>Username: </b><span>{{userdata[1]}}</span>
|
||||
<b>Joined: </b><span>{{userdata[3]|ctime}}</span>
|
||||
<b>Status: </b><span>{% if userdata[4] %}{{userdata[4]}}{% else %}Okay{% endif %}</span>
|
||||
</div>
|
||||
{% if userdata[0] == login_userid %}
|
||||
<br>
|
||||
<form action="/user/{{userdata[0]}}" method="post">
|
||||
<div class="grid-container">
|
||||
<input type="hidden" name="edit-type" value="password">
|
||||
<h3>Change Password:</h3><div></div>
|
||||
<b>Old Password: </b><input type="password" name="old-pass" placeholder="******">
|
||||
<b>New Password: </b><input type="password" name="new-pass" placeholder="********">
|
||||
<b>Confirm Password: </b><input type="password" name="conf-pass" placeholder="********">
|
||||
<input type="submit" value="Change Password">
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue