MM/Swiss can only be chosen at tournament creation, and display according fields properly
This commit is contained in:
@@ -278,4 +278,12 @@ onLoad(() => {
|
|||||||
shortName.on('input', e => {
|
shortName.on('input', e => {
|
||||||
manualShortName = true;
|
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');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@@ -89,7 +89,7 @@
|
|||||||
<div class="four wide field">
|
<div class="four wide field">
|
||||||
<label>Pairing</label>
|
<label>Pairing</label>
|
||||||
<span class="info"></span>
|
<span class="info"></span>
|
||||||
<select name="pairing">
|
<select name="pairing" #if($tour)disabled#end>
|
||||||
<option value="MAC_MAHON" #if(!$tour || $tour.pairing.type == 'MAC_MAHON') selected #end>Mac Mahon</option>
|
<option value="MAC_MAHON" #if(!$tour || $tour.pairing.type == 'MAC_MAHON') selected #end>Mac Mahon</option>
|
||||||
<option value="SWISS" #if($tour && $tour.pairing.type == 'SWISS') selected #end>Swiss</option>
|
<option value="SWISS" #if($tour && $tour.pairing.type == 'SWISS') selected #end>Swiss</option>
|
||||||
## TODO <option value="ROUND_ROBIN" #if($tour && $tour.pairing.type == 'ROUND_ROBIN') selected #end>Round-robin</option>
|
## TODO <option value="ROUND_ROBIN" #if($tour && $tour.pairing.type == 'ROUND_ROBIN') selected #end>Round-robin</option>
|
||||||
|
Reference in New Issue
Block a user