From d7952fcf9465a38025c2ecc7e4439e1a0f281025 Mon Sep 17 00:00:00 2001 From: Claude Brisson Date: Sat, 13 Jul 2024 11:58:28 +0200 Subject: [PATCH] MM/Swiss can only be chosen at tournament creation, and display according fields properly --- view-webapp/src/main/webapp/js/tour-information.inc.js | 8 ++++++++ view-webapp/src/main/webapp/tour-information.inc.html | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/view-webapp/src/main/webapp/js/tour-information.inc.js b/view-webapp/src/main/webapp/js/tour-information.inc.js index 1f43858..a009703 100644 --- a/view-webapp/src/main/webapp/js/tour-information.inc.js +++ b/view-webapp/src/main/webapp/js/tour-information.inc.js @@ -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'); + }); }); diff --git a/view-webapp/src/main/webapp/tour-information.inc.html b/view-webapp/src/main/webapp/tour-information.inc.html index b7a43aa..9571549 100644 --- a/view-webapp/src/main/webapp/tour-information.inc.html +++ b/view-webapp/src/main/webapp/tour-information.inc.html @@ -89,7 +89,7 @@
- ## TODO