66 lines
2.8 KiB
HTML
66 lines
2.8 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</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<style>
|
|
body.dark-mode {
|
|
background-color: #121212;
|
|
color: #ffffff;
|
|
}
|
|
.card.dark-mode {
|
|
background-color: #1e1e1e;
|
|
color: #ffffff;
|
|
}
|
|
.dark-mode label, .dark-mode th, .dark-mode td {
|
|
color: #ffffff;
|
|
}
|
|
@media (max-width: 768px) {
|
|
h1 {
|
|
font-size: 1.5rem;
|
|
}
|
|
.btn {
|
|
font-size: 0.9rem;
|
|
padding: 0.5rem 1rem;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="{{ 'dark-mode' if theme == 'dark' else '' }}">
|
|
<div class="container py-5">
|
|
<h1 class="text-center mb-4">Edit Group</h1>
|
|
<form method="POST">
|
|
<div class="row">
|
|
<div class="col-md-6 col-12">
|
|
<div class="mb-3">
|
|
<label for="name" class="form-label">Group Name</label>
|
|
<input type="text" class="form-control {{ 'dark-mode' if theme == 'dark' else '' }}" id="name" name="name" value="{{ group.name }}" required>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6 col-12">
|
|
<div class="mb-3">
|
|
<label for="players" class="form-label">Select Players</label>
|
|
<select multiple class="form-control {{ 'dark-mode' if theme == 'dark' else '' }}" id="players" name="players">
|
|
{% for player in players %}
|
|
<option value="{{ player.id }}" {% if player in group.players %}selected{% endif %}>{{ player.username }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Add this above the player selection -->
|
|
<div class="alert alert-warning" role="alert">
|
|
<strong>Warning:</strong> Adding new players to this group will delete their individual playlists.
|
|
Removing players from the group will allow them to have their own playlists again.
|
|
</div>
|
|
<div class="text-center">
|
|
<button type="submit" class="btn btn-primary">Save Changes</button>
|
|
<a href="{{ url_for('dashboard') }}" class="btn btn-secondary mt-3">Back to Dashboard</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"></script>
|
|
</body>
|
|
</html> |