Commit 615c9515 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Simpler first page in booth

parent beb60f68
......@@ -276,10 +276,9 @@ let addQuestions sk params qs =
)
let createStartButton params intro_div qs =
let div = Dom_html.createDiv document in
div##setAttribute (Js.string "style", Js.string "text-align:center;");
let b = document##createElement (Js.string "button") in
let t = document##createTextNode (Js.string "Start") in
b##setAttribute (Js.string "style", Js.string "font-size:20px;");
let t = document##createTextNode (Js.string "here") in
b##onclick <- Dom_html.handler (fun _ ->
(match prompt "Please enter your credential:" with
| Some cred ->
......@@ -294,8 +293,7 @@ let createStartButton params intro_div qs =
Js._false
);
Dom.appendChild b t;
Dom.appendChild div b;
div
b
let drop_trailing_newline s =
let n = String.length s in
......@@ -313,7 +311,7 @@ let loadElection () =
setNodeById "election_fingerprint" P.fingerprint;
withElementById "intro" (fun e ->
let b = createStartButton election_params e P.params.e_questions in
Dom.appendChild e b
withElementById "input_code" (fun e -> Dom.appendChild e b)
)
let split str prefix =
......
......@@ -27,27 +27,11 @@
</div>
<div id="main">
<div style="text-align:center; margin-bottom:20px;">
<span id="progress1" style="font-weight:bold;">Introduction</span><span id="progress2">Answer to questions</span><span id="progress3">Review and encrypt</span><span id="progress4">Authenticate</span><span id="progress5">Confirm</span><span id="progress6">Done</span>
<span id="progress1" style="font-weight:bold;">Input credential</span><span id="progress2">Answer to questions</span><span id="progress3">Review and encrypt</span><span id="progress4">Authenticate</span><span id="progress5">Confirm</span><span id="progress6">Done</span>
<hr/>
</div>
<div id="intro">
<p>To cast a vote, you will be led through the following steps. If you have not yet logged in, you will be asked to do so at the very end of the process.</p>
<ol>
<li><b>Enter</b> your credential.</li>
<li>
<b>Select</b> your options.
<div>Answer the questions, and review your choices.</div>
</li>
<li>
<b>Encrypt</b> your selection.
<div>Your selection is encrypted safely inside your browser.</div>
<div>A smart ballot tracker is given to let you track your ballot.</div>
</li>
<li>
<b>Submit</b> your encrypted ballot.
<div>Proceed to log in and cast your encrypted ballot for tallying.</div>
</li>
</ol>
<div id="intro" style="text-align:center;">
<p id="input_code" style="font-size:20px;">Input your credential </p>
</div>
<div id="question_div"></div>
<div id="plaintext_div" style="display:none;">
......@@ -75,7 +59,7 @@
<input type="submit" value="Confirm and submit"/>
</form>
</div>
<button onclick="location.reload();">Cancel</button>
<button onclick="location.reload();">Restart</button>
</center>
</div>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment