Artberry-web/templates/profile_edit.html
2025-02-16 16:38:57 +02:00

80 lines
3.4 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css2?family=Comfortaa:wght@300&display=swap" rel="stylesheet">
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
<link rel="icon" href="{{ url_for('static', filename='artberry.ico') }}" type="image/x-icon">
<title>🫐 Profile Edit - Artberry 🫐</title>
</head>
<body>
<h2>Edit Profile</h2>
<form method="POST" action="{{ url_for('profile_edit') }}" enctype="multipart/form-data">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input type="hidden" name="section" value="avatar_banner">
<label>Avatar:</label>
<input type="file" name="avatar" accept="image/*"><br>
<label>Banner:</label>
<input type="file" name="banner" accept="image/*"><br>
<button type="submit" class="button">Save Avatar & Banner</button>
</form>
<form method="POST" action="{{ url_for('profile_edit') }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input type="hidden" name="section" value="decoration">
<h2>Your Decorations</h2>
<label for="selected_item">Select Decoration:</label>
<select name="selected_item">
<option value="">Select a decoration</option>
{% for user_item in user_items %}
<option value="{{ user_item.item.id }}">{{ user_item.item.item_path }}</option>
{% endfor %}
</select><br>
<button type="submit" class="button">Save Decoration</button>
</form>
<form method="POST" action="{{ url_for('profile_edit') }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input type="hidden" name="section" value="username">
<h2>Change Username</h2>
<label>New Username:</label>
<input type="text" class="input-field" name="new_username" maxlength="20"><br>
<button type="submit" class="button">Change Username</button>
</form>
<form method="POST" action="{{ url_for('profile_edit') }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input type="hidden" name="section" value="bio">
<h2>About Me</h2>
<textarea name="bio" class="input-field" maxlength="32">{{ user.bio }}</textarea><br>
<button type="submit" class="button">Update Bio</button>
</form>
<form method="POST" action="{{ url_for('profile_edit') }}" enctype="multipart/form-data">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input type="hidden" name="section" value="create_post">
<form method="POST" action="{{ url_for('profile_edit') }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input type="hidden" name="section" value="password">
<h2>Change Password</h2>
<label>Current Password:</label>
<input type="password" class="input-field" name="current_password"><br>
<label>New Password:</label>
<input type="password" class="input-field" name="new_password"><br>
<label>Confirm New Password:</label>
<input type="password" class="input-field" name="confirm_new_password"><br>
<button type="submit" class="button">Change Password</button>
</form>
</body>
</html>