summaryrefslogtreecommitdiff
path: root/create.html
diff options
context:
space:
mode:
Diffstat (limited to 'create.html')
-rw-r--r--create.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/create.html b/create.html
index 5eb0076..f1cc31b 100644
--- a/create.html
+++ b/create.html
@@ -1,3 +1,6 @@
+<style>
+input:disabled + span { color: gray; }
+</style>
<p>
Player count:
<br>
@@ -11,3 +14,20 @@ Player count:
<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>