Commit d6d8fe47 authored by Stephane Glondu's avatar Stephane Glondu

New experimental booth

parent 48f77bf8
......@@ -2,4 +2,5 @@
<src/platform/native/*>: package(zarith), package(calendar), package(cryptokit)
<src/web/*.{ml,mli,byte,native,odoc}>: thread, package(eliom.server), syntax(camlp4o), package(lwt.syntax), package(csv)
<src/tool/tool_cmdline.*>: package(zarith), package(calendar), package(cryptokit), package(cmdliner), use_platform-native
<src/tool/tool_js.*> or <src/platform/js/*>: package(js_of_ocaml), syntax(camlp4o), package(js_of_ocaml.syntax), use_platform-js
<src/tool/tool_js.*> or <src/platform/js/*> or <src/booth/*>: package(js_of_ocaml), syntax(camlp4o), package(js_of_ocaml.syntax), use_platform-js
<src/booth/*>: package(lwt.syntax)
......@@ -2,3 +2,4 @@ minimal.otarget
......@@ -86,6 +86,7 @@ let () = dispatch & function
Pathname.define_context "src/web" ["src/lib"];
Pathname.define_context "src/tool" ["src/lib"];
Pathname.define_context "src/booth" ["src/lib"];
Pathname.define_context "demo" ["src/lib"];
Pathname.define_context "stuff" ["src/lib"];
Pathname.define_context "." ["src/lib"];
......@@ -112,6 +113,8 @@ let () = dispatch & function
copy_rule "belenios-tool" ("src/tool/tool_cmdline" ^ exe_suffix) "belenios-tool";
List.iter (copy_ext_js_rule "src/tool") ["jsbn.js"; "jsbn2.js"; "sjcl.js"];
List.iter (copy_ext_js_rule "src/booth") ["jsbn.js"; "jsbn2.js"; "sjcl.js"];
copy_platform_js_rule "src/tool" "random.js";
copy_platform_js_rule "src/booth" "random.js";
| _ -> ()
This diff is collapsed.
<!DOCTYPE html>
<html xmlns="" dir="ltr" lang="en">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Belenios Booth</title>
<script src="sjcl.js"></script>
<script src="jsbn.js"></script>
<script src="jsbn2.js"></script>
<script src="random.js"></script>
<script src="booth.js"></script>
<div id="election_loader" style="display:none;">
<h1>Election loader</h1>
Election parameters:
<div><textarea id="election_params" rows="1" cols="80"></textarea></div>
<div><button id="load_election">Load election</button></div>
<div id="booth_div" style="display:none;">
<div align="center">
<h1 id="election_name"></h1>
<p id="election_description"></p>
<div>Election UUID: <span id="election_uuid"></span></div>
<div>Election Fingerprint: <span id="election_fingerprint"></span></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>
<li><b>Enter</b> your credential.</li>
<b>Select</b> your options.
<div>Answer the questions, and review your choices.</div>
<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>
<b>Submit</b> your encrypted ballot.
<div>Proceed to log in and cast your encrypted ballot for tallying.</div>
<div id="question_div"></div>
<div id="plaintext_div" style="display:none;">
<h2>Review your ballot</h2>
<div id="pretty_choices"></div>
<div style="display:none;">
Plaintext raw ballot:
<div><textarea id="choices" rows="1" cols="80" readonly="readonly"></textarea></div>
<div><button id="encrypt">Confirm and encrypt</button></div>
<div id="ballot_div" style="display:none;">
<form id="ballot_form" method="POST">
<div style="display:none;">
Encrypted ballot:
<textarea id="ballot" rows="1" cols="80" name="encrypted_vote" readonly="readonly"></textarea>
Your ballot has been successfully encrypted!
Your smart ballot tracker is <span id="ballot_tracker"></span>.
Refresh this page to start again from the beginning.
<input type="submit" value="Submit"/>
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