blob: bea7d885009c6fca6eeb7c2fd3db0977de8cd29b (
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
39
40
41
42
|
<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="deluxe">Deluxe Edition Playtest (<a href="/time-of-crisis/info/playtest.html">*</a>)
</label>
<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>
<script>
var e_scenario = document.querySelector("select[name='scenario']")
var e_deluxe = document.querySelector("input[name='deluxe']")
var e_no_demagogue = document.querySelector("input[name='no_demagogue']")
function update_no_demagogue_input(event) {
if (e_scenario.value.includes("Expansion") && !e_deluxe.checked) {
e_no_demagogue.removeAttribute("disabled")
} else {
e_no_demagogue.setAttribute("disabled", true)
e_no_demagogue.checked = false
}
}
e_scenario.onchange = update_no_demagogue_input
e_deluxe.onchange = update_no_demagogue_input
</script>
|