Files
dotter_t3/packages/watten/Resources/Private/Partials/SelectTournament.html
T
2026-10-18 17:49:22 +02:00

38 lines
995 B
HTML

<f:asset.script identifier="loadspieltage">
function ladeSpieltage(){
$.ajax({
url: "../index.php",
type: "GET",
data: {
application: "loadspieltage",
tournament: $( "#tournament" ).val()
},
dataType : "json"
})
.done(function( response ) {
$("#grid_ergebnisse").jsGrid({ data: '' });
$("#grid_punkte").jsGrid({ data: '' });
$('#story_text').html('');
myChart.data = [];
myChart.update();
var $select = $('#spieltagselect');
$select.find('option').remove();
$.each(response, function(key, value) {
$select.append(`<option value="${value.id}">${value.name}</option>`);
});
})
}
</f:asset.script>
<f:form.select id="tournament"
name="tournament"
options="{tournaments}"
optionValueField="id"
optionLabelField="name"
additionalAttributes="{onchange: 'ladeSpieltage();'}"
value="{active_tournaments}" />