diff --git a/html/blt/index.html b/html/blt/index.html
index f0c5a33..1b8f6a1 100644
--- a/html/blt/index.html
+++ b/html/blt/index.html
@@ -34,7 +34,7 @@
Information and instructions
-
+
@@ -44,15 +44,17 @@
Ballot value:
-
+
-
+
Enter the candidates' names, one per line:
-
+
-
Warning: Adding, removing or reordering candidates once ballots have been input may result in unexpected behaviour.
+
Warning: Adding, removing or reordering candidates once ballots have been input may result in unexpected behaviour.
diff --git a/html/blt/index.js b/html/blt/index.js
index 90ddf42..b13991e 100644
--- a/html/blt/index.js
+++ b/html/blt/index.js
@@ -16,7 +16,7 @@
along with this program. If not, see
.
*/
-let candidates = ['Candidate 1', 'Candidate 2', 'Candidate 3'];
+let candidates = [];
let ballots = [];
let inpFile = document.getElementById('inpFile');
@@ -160,9 +160,13 @@ async function changeInpFile() {
}
}
+ // Go to ballot entry screen
+ document.getElementById('bltMain').style.display = '';
+ document.getElementById('divEditCandidates').style.display = 'none';
+
// Update ballot entry
initBallot();
-
+
// Update ballot list
selBallots.innerHTML = '
';
selBallots.value = 'new';
@@ -247,7 +251,7 @@ function clickExportBLT() {
function clickEditCandidates() {
document.getElementById('bltMain').style.display = 'none';
- document.getElementById('divEditCandidates').style.display = 'block';
+ document.getElementById('divEditCandidates').style.display = '';
document.getElementById('txtCandidates').value = candidates.join('\n');
}
@@ -263,11 +267,6 @@ function clickSaveCandidates() {
initBallot();
changeBallot();
- document.getElementById('bltMain').style.display = 'flex';
+ document.getElementById('bltMain').style.display = '';
document.getElementById('divEditCandidates').style.display = 'none';
}
-
-// Init tasks
-
-initBallot();
-changeBallot();