blob: a345f178a22f12b8252d91291ba9a65f3eff40f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<style>
input:disabled + span { color: gray; }
</style>
<p>
Player count:
<br>
<select name="players">
<option value="">4 Player</option>
<option value="3">3 Player</option>
<option value="2">2 Player</option>
</select>
<p>
<label>
<input type="checkbox" value="true" name="emperor">Optional Emperor Rules
</label>
<p>
<label>
<input type="checkbox" value="true" name="no_demagogue" disabled><span>No Demagogue</span>
</label>
<p>
<label>
<input type="checkbox" value="true" name="long_game">Long game (to 90 Legacy)
</label>
<script>
document.querySelector("select[name='scenario']").onchange = function (event) {
let input = document.querySelector("input[name='no_demagogue']")
if (/Expansion/.test(event.target.value)) {
input.removeAttribute("disabled")
} else {
input.setAttribute("disabled", true)
input.checked = false
}
}
</script>
|