<!--Modal Zuweisung User - Coach -->
<div class="modal fade" id="coachingOverviewUser2CoachModal{{ user.userID }}" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-lg modal-dialog-centered" role="document">
        <div class="modal-content text-left">
            <div class="modal-header">
                <h2 class="modal-title">Coach-Zuweisung für &laquo;{{ user.displayName }}&raquo;</h2>
            </div>
            <div class="modal-body">  
                {% if coaches | first.coachID != "" %}
                <p>Wählen Sie einen Coach:</p>
                {% for coach in coaches %}
                <div class="form-check mb-2 d-flex align-items-center">
                    <input class="form-check-input" type="radio" name="coaches" id="user_{{user.userID}}_coach_{{coach.coachID}}">
                    <label class="form-check-label ml-2" for="user_{{user.userID}}_coach_{{coach.coachID}}">
                        {{coach.coachDisplayName}}
                    </label>
                </div>
                {% endfor %}
                {% else %}
                <div class="alert alert-info">
                    <h5><i class="fas fa-info-circle"></i>&nbsp;Hinweis</h5>
                    <p>
                        Aktuell stehen keine Coaches für eine Zuweisung zur Verfügung.
                    </p>                    
                </div>
                {% endif %}
                <div class="alert alert-danger coaching-overview-user2coach-modal-errormsg" id="coaching-overview-user2coach-modal-errormsg_{{user.userID}}">
                    <h5><i class="fas fa-times-circle"></i>&nbsp;Fehler</h5>
                    <p>
                        Es wurde kein Coach ausgewählt.
                    </p>
                </div>

            </div>
            <div class="modal-footer">
                <div>
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">Abbrechen</button>
                    {% if coaches | first.coachID != "" %}
                    <button type="button" id="coaching-overview-user2coach-button" class="btn btn-primary">Bestätigen</button>
                    {% endif %}
                </div>
            </div>
        </div>
    </div>
</div> 

