From 67c17c5a1e0e059331bc8c3476840b83f5f9c3ea Mon Sep 17 00:00:00 2001 From: Sandy Currier Date: Tue, 5 Mar 2024 15:11:46 -0500 Subject: [PATCH] cleaning up more checkout text --- voting.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/voting.html b/voting.html index b8fa83d..22d51fd 100644 --- a/voting.html +++ b/voting.html @@ -573,11 +573,21 @@

Your RCV selection:

index += 1; console.log("contest " + index + " (" + contestName + "), selection = " + selections); box1.innerHTML = "Contest " + index + ":  " + contestName; + let max = Object.values(contest)[0].max; + if (!max) { + max = Object.values(contest)[0].choices.length; + } if (selections.length == 0) { box2.innerHTML = "no selection - skipped"; box2.classList.add("novotedText"); } else { box2.innerHTML = smartenSelections(selections, Object.values(contest)[0].tally).join("
"); + if (selections.length < max) { + const extraText = document.createElement("span"); + extraText.innerHTML = "
undervoted - more votes are allowed"; + extraText.classList.add("undervotedText"); + box2.appendChild(extraText); + } } // Create the goto button const gotoButton = document.createElement("button");