Skip to content

Commit

Permalink
cleaning up more checkout text
Browse files Browse the repository at this point in the history
  • Loading branch information
windoverwater committed Mar 5, 2024
1 parent abb9877 commit 67c17c5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions voting.html
Original file line number Diff line number Diff line change
Expand Up @@ -573,11 +573,21 @@ <h3>Your RCV selection:</h3>
index += 1;
console.log("contest " + index + " (" + contestName + "), selection = " + selections);
box1.innerHTML = "Contest " + index + ":&nbsp&nbsp" + 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("<br>");
if (selections.length < max) {
const extraText = document.createElement("span");
extraText.innerHTML = "<br>undervoted - more votes are allowed";
extraText.classList.add("undervotedText");
box2.appendChild(extraText);
}
}
// Create the goto button
const gotoButton = document.createElement("button");
Expand Down

0 comments on commit 67c17c5

Please sign in to comment.