From abb98773d037351507baa2f5e51a241f36e86617 Mon Sep 17 00:00:00 2001 From: Sandy Currier Date: Tue, 5 Mar 2024 14:48:36 -0500 Subject: [PATCH] fixing next button text --- voting.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/voting.html b/voting.html index 5e78e34..b8fa83d 100644 --- a/voting.html +++ b/voting.html @@ -690,7 +690,11 @@

Your RCV selection:

// Setup the bottomSection - this supplies simply "next context/checkout" // navigation. Note - the voter's selection is saved when navigating away // from the page - hence it needs _this_ thisContestValue. - setupNextButtonListener("Next contest (" + nextContest + ")", nextContest, thisContestValue); + let nextButtonString = "Go to next contest"; + if (nextContest >= numberOfContests) { + nextButtonString = "Go to checkout"; + } + setupNextButtonListener(nextButtonString, nextContest, thisContestValue); } // If here, this is the first contest