aTweet/templates/edit_group.html

49 lines
2.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Edit {{ group.name }} - aTweet</title>
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
</head>
<body>
<div class="container">
<h1>Edit Group</h1>
<form action="{{ url_for('edit_group', group_id=group.id) }}" method="POST" enctype="multipart/form-data" class="edit-group-form">
<input type="text" name="name" value="{{ group.name }}" required>
<textarea name="description">{{ group.description }}</textarea>
<input type="file" name="group_picture" accept="image/*">
<button type="submit" class="btn btn-primary">Save Changes</button>
</form>
<form action="{{ url_for('delete_group', group_id=group.id) }}" method="POST" class="delete-group-form">
<button type="submit" class="btn btn-danger" onclick="return confirm('Are you sure you want to delete this group?')">Delete Group</button>
</form>
</div>
<footer>
<div class="footer-container">
<a href="{{ url_for('index') }}" class="footer-button">
<i class="fas fa-home"></i> Home
</a>
<a href="{{ url_for('profile', username=session.username) }}" class="footer-button">
<i class="fas fa-user"></i> Profile
</a>
<a href="{{ url_for('groups') }}" class="footer-button">
<i class="fas fa-users"></i> Groups
</a>
<a href="{{ url_for('dms') }}" class="footer-button">
<i class="fas fa-envelope"></i> DMs
</a>
{% if session.user_id and get_user_by_id(session.user_id)['username'] == 'avery' %}
<a href="{{ url_for('admin_panel') }}" class="footer-button">
<i class="fas fa-cog"></i> Admin Panel
</a>
{% endif %}
<a href="{{ url_for('logout') }}" class="footer-button">
<i class="fas fa-sign-out-alt"></i> Logout
</a>
</div>
</footer>
</body>
</html>