49 lines
1.8 KiB
HTML
49 lines
1.8 KiB
HTML
{% extends "layout.html" %}
|
|
|
|
{% block content %}
|
|
<div class="profile-container">
|
|
<h1>My Profile</h1>
|
|
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
{% for category, message in messages %}
|
|
<div class="alert alert-{{ category }}">{{ message }}</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
<div class="profile-info">
|
|
<p><strong>Username:</strong> {{ user.username }}</p>
|
|
<p><strong>Account Type:</strong> {% if user.is_admin %}Administrator{% else %}User{% endif %}</p>
|
|
<p><strong>Member Since:</strong> {{ user.created_at.strftime('%Y-%m-%d') }}</p>
|
|
</div>
|
|
|
|
<h2>Update Profile</h2>
|
|
<form method="POST" action="{{ url_for('profile') }}" class="profile-form">
|
|
<div class="form-group">
|
|
<label for="email">Email</label>
|
|
<input type="email" id="email" name="email" class="form-control" value="{{ user.email }}" required>
|
|
</div>
|
|
|
|
<h3>Change Password</h3>
|
|
<div class="form-group">
|
|
<label for="current_password">Current Password</label>
|
|
<input type="password" id="current_password" name="current_password" class="form-control">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="new_password">New Password</label>
|
|
<input type="password" id="new_password" name="new_password" class="form-control">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="confirm_password">Confirm New Password</label>
|
|
<input type="password" id="confirm_password" name="confirm_password" class="form-control">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<button type="submit" class="btn btn-primary">Update Profile</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{% endblock %} |