Commit eeb8f3c4 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Merge booth

parents 4d0aa136 6c64f554
......@@ -305,6 +305,7 @@ let createStartButton params intro_div qs =
(match prompt "Please enter your credential:" with
| Some cred when checkCredential cred ->
intro_div##style##display <- Js.string "none";
setDisplayById "question_div" "block";
Dom_html.window##onbeforeunload <- Dom_html.handler (fun _ ->
Js._false
);
......
......@@ -31,13 +31,16 @@
<hr/>
</div>
<div id="intro" style="text-align:center;">
<div class="current_step">Step 1/6: Input your credential</div>
<br/><br/>
<p id="input_code" style="font-size:20px;">Input your credential </p>
<br/><br/>
</div>
<div id="question_div"></div>
<div id="question_div" style="display:none;">
<div class="current_step">Step 2/6: Answer to questions</div>
</div>
<div id="plaintext_div" style="display:none;">
<h2>Review your ballot</h2>
<div class="current_step">Step 3/6: Review and encrypt</div>
<div id="pretty_choices"></div>
<div style="display:none;">
Plaintext raw ballot:
......@@ -58,6 +61,7 @@
</div>
<p>Your ballot has been successfully encrypted, <b>but has not been cast yet</b>!</p>
<p>Your smart ballot tracker is <span id="ballot_tracker"></span></p>
<p>We invite you to save it in order to check later that it is taken into account.</p>
<br/>
<input type="submit" value="Continue" style="font-size:30px;"/>
<br/><br/>
......
......@@ -31,3 +31,8 @@ ul {
button {
cursor: pointer;
}
.current_step {
text-align: center;
font-size: 28px;
padding-bottom: 28px;
}
......@@ -1263,6 +1263,9 @@ let cast_confirmation w hash () =
] in
let content = [
progress;
div ~a:[a_class ["current_step"]] [
pcdata "Step 5/6: Confirm";
];
p [
pcdata "Your ballot for ";
em [pcdata name];
......@@ -1299,23 +1302,27 @@ let cast_confirmed w ~result () =
b [pcdata "Done"];
hr ();
] in
let result =
let result, step_title =
match result with
| `Valid hash ->
[pcdata " has been accepted, your smart ballot tracker is ";
b [pcdata hash];
pcdata ". We invite you to save it and check its presence in the ";
pcdata ". You can check its presence in the ";
a ~service:election_pretty_ballots [pcdata "ballot box"] ((params.e_uuid, ()), 1);
pcdata ".";
]
pcdata " anytime during the election.";
], "Thank you for voting!"
| `Error e ->
[pcdata " is rejected, because ";
pcdata (Web_common.explain_error e);
pcdata ".";
]
], "FAIL!"
in
let content = [
progress;
div ~a:[a_class ["current_step"]] [
pcdata "Step 6/6: ";
pcdata step_title;
];
p ([
pcdata "Your ballot for ";
em [pcdata name];
......
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