BiryaniHubflask30 / templates /edit_profile.html
nagasurendra's picture
Create edit_profile.html
af75dfd verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Edit Profile</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container mt-4">
<h1>Edit Profile</h1>
<!-- Display success or error messages -->
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<div class="alert alert-{{ messages[0][0] }}">
{{ messages[0][1] }}
</div>
{% endif %}
{% endwith %}
<form method="POST">
<div class="mb-3">
<label for="name" class="form-label">Full Name</label>
<input type="text" class="form-control" id="name" name="name" value="{{ user_name }}" required>
</div>
<div class="mb-3">
<label for="email" class="form-label">Email address</label>
<input type="email" class="form-control" id="email" name="email" value="{{ user_email }}" required>
</div>
<div class="mb-3">
<label for="phone" class="form-label">Phone Number</label>
<input type="tel" class="form-control" id="phone" name="phone" value="{{ user_phone }}" required>
</div>
<div class="mb-3">
<label for="password" class="form-label">New Password (Optional)</label>
<input type="password" class="form-control" id="password" name="password" placeholder="Leave blank to keep the current password">
</div>
<button type="submit" class="btn btn-primary">Update Profile</button>
</form>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>