MM/Swiss can only be chosen at tournament creation, and display according fields properly

This commit is contained in:
Claude Brisson
2024-07-13 11:58:28 +02:00
parent bbf0308994
commit d7952fcf94
2 changed files with 9 additions and 1 deletions

View File

@@ -278,4 +278,12 @@ onLoad(() => {
shortName.on('input', e => {
manualShortName = true;
});
$('select[name="pairing"]').on('change', e => {
let pairing = e.target.value.toLowerCase();
if (pairing === 'mms') $('#tournament-infos .mms').removeClass('hidden');
else $('#tournament-infos .mms').addClass('hidden');
if (pairing === 'swiss') $('#tournament-infos .swiss').removeClass('hidden');
else $('#tournament-infos .swiss').addClass('hidden');
});
});