summaryrefslogtreecommitdiff
path: root/create.html
diff options
context:
space:
mode:
Diffstat (limited to 'create.html')
-rw-r--r--create.html18
1 files changed, 11 insertions, 7 deletions
diff --git a/create.html b/create.html
index b534c8e..bea7d88 100644
--- a/create.html
+++ b/create.html
@@ -12,7 +12,7 @@ Player count:
<p>
<label>
-<input type="checkbox" value="true" name="deluxe">Deluxe Edition Playtest
+<input type="checkbox" value="true" name="deluxe">Deluxe Edition Playtest (<a href="/time-of-crisis/info/playtest.html">*</a>)
</label>
<p>
@@ -26,13 +26,17 @@ Player count:
</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")
+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 {
- input.setAttribute("disabled", true)
- input.checked = false
+ 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>