Commit 9fa335f8 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Cosmetic changes

parent 5cc81b33
......@@ -156,6 +156,7 @@ let rec createQuestionNode sk params question_div num_questions i prev (q, answe
in
if answers.(i) > 0 then cb##checked <- Js.bool true;
checkbox##setAttribute (Js.string "type", Js.string "checkbox");
checkbox##setAttribute (Js.string "style", Js.string "cursor: pointer;");
Dom.appendChild div checkbox;
let t = document##createTextNode (Js.string a) in
checkbox##onclick <- Dom_html.handler (fun _ ->
......@@ -207,6 +208,7 @@ let rec createQuestionNode sk params question_div num_questions i prev (q, answe
| [] ->
(* last question, create a "Proceed" button instead of "Next" *)
let b = document##createElement (Js.string "button") in
b##setAttribute (Js.string "style", Js.string "font-size: 30px;");
let t = document##createTextNode (Js.string "Proceed") in
b##onclick <- Dom_html.handler (fun _ ->
if check_constraints () then (
......
......@@ -28,3 +28,6 @@ ul {
#header a {
color: #ffffff;
}
button {
cursor: pointer;
}
......@@ -269,7 +269,7 @@ let make_login_box style auth links =
let make_button ~service contents =
let uri = Eliom_uri.make_string_uri ~service () in
Printf.ksprintf Unsafe.data (* FIXME: unsafe *)
"<button onclick=\"location.href='%s';\" style=\"font-size:30px;\">%s</button>"
"<button onclick=\"location.href='%s';\" style=\"font-size:35px;\">%s</button>"
uri
contents
......@@ -844,7 +844,9 @@ let make_login_box style auth links =
pcdata "I am ";
format_user u;
pcdata " and ";
string_input ~input_type:`Submit ~value:"I confirm my vote" ();
string_input
~a:[a_style "font-size: 20px; cursor: pointer;"]
~input_type:`Submit ~value:"I cast my vote" ();
pcdata ".";
]
]) (params.e_uuid, ())
......@@ -874,8 +876,9 @@ let make_login_box style auth links =
b [pcdata hash];
pcdata ".";
br ();
br ();
];
br ();
p [pcdata "Note: your ballot is encrypted and nobody can see its contents."];
user_div;
p [
(let service =
......@@ -901,23 +904,34 @@ let make_login_box style auth links =
b [pcdata "Done"];
hr ();
] in
let result =
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 ";
a ~service:election_pretty_ballots [pcdata "ballot box"] ((params.e_uuid, ()), 1);
pcdata ".";
]
| `Error e ->
[pcdata " is rejected, because ";
pcdata (Web_common.explain_error e);
pcdata ".";
]
in
let content = [
progress;
p [
p ([
pcdata "Your ballot for ";
em [pcdata name];
(match result with
| `Valid hash -> pcdata (" has been accepted, your smart ballot tracker is " ^ hash ^ ".")
| `Error e -> pcdata (" is rejected, because " ^ Web_common.explain_error e ^ ".")
);
];
] @ result);
p [
(let service =
Eliom_service.preapply
election_logout (params.e_uuid, ())
in
a ~service [
pcdata "Log out"
pcdata "Log out and come back to election page"
] ());
pcdata ".";
];
......
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