Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
belenios
belenios
Commits
89078e00
Commit
89078e00
authored
Jul 20, 2017
by
Stephane Glondu
Browse files
In tool_js_ttkeygen, hide data_form when no submission is expected
parent
04de0d47
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/tool/tool_js_common.ml
View file @
89078e00
...
...
@@ -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"
)
src/tool/tool_js_ttkeygen.ml
View file @
89078e00
...
...
@@ -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
->
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment