ajout de match régulier pour les équipes et de pratiques
Ajout d'un profil public cliquable pour les utilisateurs déplacement du profil
This commit is contained in:
@@ -16,15 +16,19 @@
|
||||
{% block content %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3><i class="fas fa-futbol"></i> {% if match %}Edit Match{% else %}Schedule Match for {{ tryout.title }}{% endif %}</h3>
|
||||
<h3><i class="fas fa-futbol"></i> {% if match %}Edit Match{% elif is_practice %}Schedule Practice — {{ team.name }}{% else %}Schedule Match for {{ tryout.title }}{% endif %}</h3>
|
||||
{% if match %}
|
||||
<p class="text-muted small">Match Type: <strong>{{ match.match_type.replace('_', ' ') | title }}</strong></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{% if match %}{{ url_for('matches.edit_match', match_id=match.id) }}{% else %}{{ url_for('matches.create_match', tryout_id=tryout.id) }}{% endif %}" class="form" id="matchForm">
|
||||
<form method="POST" action="{% if match %}{{ url_for('matches.edit_match', match_id=match.id) }}{% elif is_practice %}{{ url_for('team_matches.create_match', team_id=team_id) }}{% else %}{{ url_for('matches.create_match', tryout_id=tryout.id) }}{% endif %}" class="form" id="matchForm">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
||||
{% if is_practice %}
|
||||
<input type="hidden" name="title" value="Practice">
|
||||
{% endif %}
|
||||
|
||||
{% if not is_practice %}
|
||||
{% if not match %}
|
||||
<div class="form-group">
|
||||
<label for="match_type">Match Type</label>
|
||||
@@ -37,16 +41,19 @@
|
||||
{% else %}
|
||||
<input type="hidden" name="match_type" value="{{ match.match_type }}">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if not is_practice %}
|
||||
<div class="form-group">
|
||||
<label for="title">Match Title</label>
|
||||
<input type="text" name="title" id="title" class="form-input" value="{{ match.title if match else '' }}" placeholder="e.g., Alpha vs Bravo Scrimmage" required>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="date">Date</label>
|
||||
<input type="date" name="date" id="date" class="form-input" value="{{ match.date.strftime('%Y-%m-%d') if match else tryout.date.strftime('%Y-%m-%d') }}" required>
|
||||
<input type="date" name="date" id="date" class="form-input" value="{{ match.date.strftime('%Y-%m-%d') if match else (prefill_date if is_practice else tryout.date.strftime('%Y-%m-%d')) }}" required>
|
||||
</div>
|
||||
{% if match %}
|
||||
<div class="form-group">
|
||||
@@ -568,10 +575,17 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
{% endif %}
|
||||
|
||||
{% if not match %}
|
||||
{% if is_practice %}
|
||||
// Practices default to player_scrim mode
|
||||
document.getElementById('player-scrim-section').classList.remove('hidden');
|
||||
document.getElementById('team-vs-team-section').classList.add('hidden');
|
||||
document.getElementById('player-vs-player-section').classList.add('hidden');
|
||||
{% else %}
|
||||
toggleMatchType();
|
||||
// Show all players initially
|
||||
updatePlayerPool();
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
function allDisponibilitiesInitialized() {
|
||||
|
||||
Reference in New Issue
Block a user