retrait de page html redondantes, ajout de la modification des username et affichage des userrname au lieu des noms complets
This commit is contained in:
+12
-12
@@ -30,7 +30,7 @@
|
||||
<select id="coach_id" name="coach_id" class="form-select">
|
||||
<option value="">-- No coach assigned --</option>
|
||||
{% for coach in coaches %}
|
||||
<option value="{{ coach.id }}">{{ coach.full_name }}</option>
|
||||
<option value="{{ coach.id }}">{{ coach.username }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
@@ -39,7 +39,7 @@
|
||||
<select id="manager_id" name="manager_id" class="form-select">
|
||||
<option value="">-- No manager assigned --</option>
|
||||
{% for manager in managers %}
|
||||
<option value="{{ manager.id }}">{{ manager.full_name }}</option>
|
||||
<option value="{{ manager.id }}">{{ manager.username }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
@@ -61,9 +61,9 @@
|
||||
<div class="card-actions">
|
||||
<div class="team-staff">
|
||||
{% if team.coach %}
|
||||
<span class="text-muted">Coach: {{ team.coach.full_name }}</span>
|
||||
<span class="text-muted">Coach: {{ team.coach.username }}</span>
|
||||
{% if can_manage %}
|
||||
<form method="POST" action="{{ url_for('teams.remove_coach', team_id=team.id) }}" class="inline-form" onsubmit="return confirm('Remove coach {{ team.coach.full_name }} from {{ team.name }}?')">
|
||||
<form method="POST" action="{{ url_for('teams.remove_coach', team_id=team.id) }}" class="inline-form" onsubmit="return confirm('Remove coach {{ team.coach.username }} from {{ team.name }}?')">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger" title="Remove Coach">
|
||||
<i class="fas fa-user-minus"></i>
|
||||
@@ -74,9 +74,9 @@
|
||||
<span class="text-muted">No coach assigned</span>
|
||||
{% endif %}
|
||||
{% if team.manager %}
|
||||
<span class="text-muted ml-2">Manager: {{ team.manager.full_name }}</span>
|
||||
<span class="text-muted ml-2">Manager: {{ team.manager.username }}</span>
|
||||
{% if can_manage %}
|
||||
<form method="POST" action="{{ url_for('teams.remove_manager', team_id=team.id) }}" class="inline-form" onsubmit="return confirm('Remove manager {{ team.manager.full_name }} from {{ team.name }}?')">
|
||||
<form method="POST" action="{{ url_for('teams.remove_manager', team_id=team.id) }}" class="inline-form" onsubmit="return confirm('Remove manager {{ team.manager.username }} from {{ team.name }}?')">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger" title="Remove Manager">
|
||||
<i class="fas fa-user-minus"></i>
|
||||
@@ -125,8 +125,8 @@
|
||||
<tr>
|
||||
<td>
|
||||
<div class="user-mini">
|
||||
<div class="avatar-sm">{{ entry.player.full_name[:2] | upper }}</div>
|
||||
<span>{{ entry.player.full_name }}</span>
|
||||
<div class="avatar-sm">{{ entry.player.username[:2] | upper }}</div>
|
||||
<span>{{ entry.player.username }}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
@@ -148,7 +148,7 @@
|
||||
<td>{{ entry.player.phone or '-' }}</td>
|
||||
{% if can_manage_team %}
|
||||
<td>
|
||||
<form method="POST" action="{{ url_for('teams.remove_player', team_id=team.id, player_id=entry.player.id) }}" class="inline-form" onsubmit="return confirm('Remove {{ entry.player.full_name }} from {{ team.name }}?')">
|
||||
<form method="POST" action="{{ url_for('teams.remove_player', team_id=team.id, player_id=entry.player.id) }}" class="inline-form" onsubmit="return confirm('Remove {{ entry.player.username }} from {{ team.name }}?')">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
||||
<button type="submit" class="btn btn-sm btn-danger">
|
||||
<i class="fas fa-user-minus"></i> Remove
|
||||
@@ -184,7 +184,7 @@
|
||||
<option value="">-- Select a player --</option>
|
||||
{% for p in all_players %}
|
||||
{% if p.id not in team.players | map(attribute='id') %}
|
||||
<option value="{{ p.id }}">{{ p.full_name }}</option>
|
||||
<option value="{{ p.id }}">{{ p.username }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
@@ -237,7 +237,7 @@
|
||||
<select id="edit_coach_id" name="coach_id" class="form-select">
|
||||
<option value="">-- No coach assigned --</option>
|
||||
{% for coach in coaches %}
|
||||
<option value="{{ coach.id }}">{{ coach.full_name }}</option>
|
||||
<option value="{{ coach.id }}">{{ coach.username }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
@@ -246,7 +246,7 @@
|
||||
<select id="edit_manager_id" name="manager_id" class="form-select">
|
||||
<option value="">-- No manager assigned --</option>
|
||||
{% for manager in managers %}
|
||||
<option value="{{ manager.id }}">{{ manager.full_name }}</option>
|
||||
<option value="{{ manager.id }}">{{ manager.username }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user