Add profile name & about-me editing form

This commit is contained in:
Xevion
2022-03-27 09:37:05 -05:00
parent 5134723841
commit 0ce1560468
5 changed files with 48 additions and 3 deletions

View File

@@ -7,7 +7,7 @@
</div>
{% endif %}
{% endwith %}
<form method="POST" action="/login" class="login-form">
<form method="POST" action="{{ url_for('auth.login_post') }}" class="login-form">
<div class="field">
<div class="control">
Username

View File

@@ -8,7 +8,7 @@
</div>
{% endif %}
{% endwith %}
<form method="POST" action="/signup" class="login-form">
<form method="POST" action="{{ url_for('auth.signup_post') }}" class="login-form">
<div class="field">
<div class="control">
Username

View File

@@ -1,5 +1,23 @@
{% extends 'layouts/index.html' %}
{% block content %}
<h3>Edit Profile</h3>
<h3>Edit Profile</h3>
<form method="POST" action="{{ url_for('forms.edit_profile_post', username=user.username) }}" class="profile-form">
<label>
Name<br>
<input type="text" name="name" value="{{ user.name }}">
</label><br>
<label>
About Me
<textarea type="text" name="about-me">{{ user.about_me }}</textarea>
</label>
<button class="button">Save & Submit</button>
</form>
{% with messages = get_flashed_messages() %}
{% if messages %}
<div class="notification is-danger">
{{ messages[0] }}
</div>
{% endif %}
{% endwith %}
{% endblock %}