Commit 89078e00 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

In tool_js_ttkeygen, hide data_form when no submission is expected

parent 04de0d47
......@@ -59,3 +59,8 @@ let get_input id =
match !res with
| None -> raise Not_found
| Some x -> x
let hide_element_by_id id =
Js.Opt.iter
(document##getElementById (Js.string id))
(fun e -> e##style##display <- Js.string "none")
......@@ -80,12 +80,15 @@ let fill_interactivity _ =
let step = int_of_string (get_textarea "step") in
match step with
| 0 ->
hide_element_by_id "data_form";
let t = document##createTextNode (Js.string "Waiting for the election administrator to set the threshold... Reload the page to check progress.") in
Dom.appendChild e t
| 2 | 4 | 6 ->
hide_element_by_id "data_form";
let t = document##createTextNode (Js.string "Waiting for the other trustees... Reload the page to check progress.") in
Dom.appendChild e t
| 7 ->
hide_element_by_id "data_form";
let t = document##createTextNode (Js.string "The key establishment protocol is finished!") in
Dom.appendChild e t
| 1 ->
......
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