1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-21 14:38:24 +02:00
Files
plateforme-tfjm2/participation/templates/participation/update_team.html
2025-01-14 19:32:05 +01:00

38 lines
1.4 KiB
HTML

{% extends request.content_only|yesno:"empty.html,base.html" %}
{% load crispy_forms_filters crispy_forms_tags i18n %}
{% block content %}
<form method="post">
<div id="form-content">
{% csrf_token %}
{{ form|crispy }}
{% crispy participation_form %}
</div>
<button class="btn btn-success" type="submit">{% trans "Update" %}</button>
</form>
{% endblock content %}
{% block extrajavascript %}
<script>
const tournamentSelect = document.getElementById('id_tournament')
const idfWarningBanner = document.getElementById('idf_warning_banner')
const unifiedRegistrationTournamentIds = idfWarningBanner.getAttribute('data-tid-unified').split(',')
if (idfWarningBanner.getAttribute('data-tid-unified') !== "") {
function updateIDFWarningBannerVisibility() {
const tid = tournamentSelect.value
if (unifiedRegistrationTournamentIds.includes(tid))
idfWarningBanner.classList.remove('d-none')
else
idfWarningBanner.classList.add('d-none')
}
tournamentSelect.addEventListener('change', updateIDFWarningBannerVisibility)
updateIDFWarningBannerVisibility()
}
else {
idfWarningBanner.classList.add('d-none')
}
</script>
{% endblock %}