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
34e8c56f
Commit
34e8c56f
authored
Jun 02, 2014
by
Stephane Glondu
Browse files
Binding for Tool_mkelection
parent
2bb0fde4
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/tool/belenios_tool.html
View file @
34e8c56f
...
...
@@ -92,6 +92,32 @@
</div>
<div
id=
"mkelection"
>
<h2>
Election creation
</h2>
<div>
<h3>
Input
</h3>
<div>
UUID:
<div><textarea
id=
"mkelection_uuid"
rows=
"1"
cols=
"80"
></textarea></div>
</div>
<div>
Group parameters:
<div><textarea
id=
"mkelection_group"
rows=
"1"
cols=
"80"
></textarea></div>
</div>
<div>
Public keys:
<div><textarea
id=
"mkelection_pks"
rows=
"1"
cols=
"80"
></textarea></div>
</div>
<div>
Template:
<div><textarea
id=
"mkelection_template"
rows=
"1"
cols=
"80"
></textarea></div>
</div>
</div>
<div>
<h3>
Output
</h3>
<div>
<button
id=
"do_mkelection"
>
Generate
</button>
<div><textarea
id=
"mkelection_output"
></textarea></div>
</div>
</div>
</div>
</body>
</html>
src/tool/tool_js.ml
View file @
34e8c56f
...
...
@@ -182,7 +182,26 @@ module Credgen = struct
]
end
let
cmds
=
Tests
.
cmds
@
Tkeygen
.
cmds
@
Credgen
.
cmds
module
Mkelection
=
struct
open
Tool_mkelection
let
mkelection
()
=
let
module
P
:
PARAMS
=
struct
let
uuid
=
get_textarea
"mkelection_uuid"
let
group
=
get_textarea
"mkelection_group"
let
template
=
get_textarea
"mkelection_template"
let
get_public_keys
()
=
Some
(
get_textarea
"mkelection_pks"
|>
split_lines
|>
Array
.
of_list
)
end
in
let
module
X
=
(
val
make
(
module
P
:
PARAMS
)
:
S
)
in
set_textarea
"mkelection_output"
(
X
.
mkelection
()
)
let
cmds
=
[
"do_mkelection"
,
mkelection
;
]
end
let
cmds
=
Tests
.
cmds
@
Tkeygen
.
cmds
@
Credgen
.
cmds
@
Mkelection
.
cmds
let
install_handlers
()
=
List
.
iter
install_handler
cmds
...
...
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