102 lines
5.3 KiB
HTML
102 lines
5.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>Add Team - HKFC Men's C Team</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
</head>
|
|
<body>
|
|
<div class="container mt-4">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h3>Add New Team</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
{% for category, message in messages %}
|
|
<div class="alert alert-{{ 'danger' if category == 'error' else 'success' }} alert-dismissible fade show" role="alert">
|
|
{{ message }}
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
<form method="POST">
|
|
{{ form.hidden_tag() }}
|
|
|
|
<div class="mb-3">
|
|
{{ form.club.label(class="form-label") }}
|
|
{{ form.club(class="form-select") }}
|
|
{% if form.club.errors %}
|
|
<div class="text-danger">
|
|
{% for error in form.club.errors %}
|
|
<small>{{ error }}</small>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
<small class="form-text text-muted">Select the club from the list of available clubs</small>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
{{ form.team.label(class="form-label") }}
|
|
{{ form.team(class="form-control") }}
|
|
{% if form.team.errors %}
|
|
<div class="text-danger">
|
|
{% for error in form.team.errors %}
|
|
<small>{{ error }}</small>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
<small class="form-text text-muted">Enter the team identifier (e.g., A, B, C, 1st, 2nd)</small>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
{{ form.display_name.label(class="form-label") }}
|
|
{{ form.display_name(class="form-control") }}
|
|
{% if form.display_name.errors %}
|
|
<div class="text-danger">
|
|
{% for error in form.display_name.errors %}
|
|
<small>{{ error }}</small>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
<small class="form-text text-muted">Enter the full display name (e.g., HKFC A, KCC 1st Team)</small>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
{{ form.league.label(class="form-label") }}
|
|
{{ form.league(class="form-select") }}
|
|
{% if form.league.errors %}
|
|
<div class="text-danger">
|
|
{% for error in form.league.errors %}
|
|
<small>{{ error }}</small>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
<small class="form-text text-muted">Select the league/division from the list</small>
|
|
</div>
|
|
|
|
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
|
|
{{ form.cancel(class="btn btn-secondary me-md-2") }}
|
|
{{ form.save_team(class="btn btn-primary") }}
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-3">
|
|
<a href="/admin/teams" class="btn btn-outline-secondary">Back to Team Management</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
</body>
|
|
</html>
|