blob: b534c8e4c955f3b17e7c43bcf6f53b4f3b7b322f (
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="deluxe">Deluxe Edition Playtest
</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>
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>
|