Files
team-tryouts/templates/pages/edit_tryout.html
T

66 lines
3.6 KiB
HTML

{% extends "layouts/base.html" %}
{% block title %}Edit Tryout - TryoutPro{% endblock %}
{% block page_title %}Edit Tryout{% endblock %}
{% block breadcrumb %}<span class="breadcrumb">Home / <a href="{{ url_for('tryouts.list_tryouts') }}">Tryouts</a> / <a href="{{ url_for('tryouts.view_tryout', tryout_id=tryout.id) }}">{{ tryout.title }}</a> / Edit</span>{% endblock %}
{% block content %}
<div class="card">
<div class="card-body">
<form method="POST" action="{{ url_for('tryouts.edit_tryout', tryout_id=tryout.id) }}" class="form">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
<div class="form-row">
<div class="form-group col-12">
<label for="title">Tryout Title</label>
<input type="text" id="title" name="title" value="{{ tryout.title }}" placeholder="e.g., Spring Season Tryouts" required>
</div>
</div>
<div class="form-row">
<div class="form-group col-6">
<label for="game">Game</label>
<select id="game" name="game" class="form-select" required>
<option value="">-- Select a game --</option>
{% for game in esport_games %}
<option value="{{ game }}" {% if tryout.game == game %}selected{% endif %}>{{ game }}</option>
{% endfor %}
</select>
</div>
<div class="form-group col-6">
<label for="date">Date</label>
<input type="date" id="date" name="date" value="{{ tryout.date.strftime('%Y-%m-%d') }}" required>
</div>
</div>
<div class="form-row">
<div class="form-group col-6">
<label for="location">Location</label>
<input type="text" id="location" name="location" value="{{ tryout.location or '' }}" placeholder="e.g., Online">
</div>
<div class="form-group col-6">
<label for="max_players">Max Players</label>
<input type="number" id="max_players" name="max_players" value="{{ tryout.max_players or '' }}" placeholder="Leave blank for unlimited" min="1">
</div>
</div>
<div class="form-row">
<div class="form-group col-6">
<label for="target_org_team_id">Target Team</label>
<select id="target_org_team_id" name="target_org_team_id" class="form-select">
<option value="">-- No target team --</option>
{% for team in org_teams %}
<option value="{{ team.id }}" {% if tryout.target_org_team_id == team.id %}selected{% endif %}>
{{ team.name }}{% if team.coach %} (Coach: {{ team.coach.full_name }}){% endif %}
</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-group">
<label for="description">Description</label>
<textarea id="description" name="description" rows="4" placeholder="Enter any details about the tryout...">{{ tryout.description or '' }}</textarea>
</div>
<div class="form-actions">
<a href="{{ url_for('tryouts.view_tryout', tryout_id=tryout.id) }}" class="btn btn-secondary">Cancel</a>
<button type="submit" class="btn btn-primary">Save Changes</button>
</div>
</form>
</div>
</div>
{% endblock %}