Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
belenios
belenios
Commits
eeb8f3c4
Commit
eeb8f3c4
authored
Feb 12, 2016
by
Stephane Glondu
Browse files
Merge booth
parents
4d0aa136
6c64f554
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/booth/booth.ml
View file @
eeb8f3c4
...
...
@@ -305,6 +305,7 @@ let createStartButton params intro_div qs =
(
match
prompt
"Please enter your credential:"
with
|
Some
cred
when
checkCredential
cred
->
intro_div
##
style
##
display
<-
Js
.
string
"none"
;
setDisplayById
"question_div"
"block"
;
Dom_html
.
window
##
onbeforeunload
<-
Dom_html
.
handler
(
fun
_
->
Js
.
_false
);
...
...
src/booth/vote.html
View file @
eeb8f3c4
...
...
@@ -31,13 +31,16 @@
<hr/>
</div>
<div
id=
"intro"
style=
"text-align:center;"
>
<div
class=
"current_step"
>
Step 1/6: Input your credential
</div>
<br/><br/>
<p
id=
"input_code"
style=
"font-size:20px;"
>
Input your credential
</p>
<br/><br/>
</div>
<div
id=
"question_div"
></div>
<div
id=
"question_div"
style=
"display:none;"
>
<div
class=
"current_step"
>
Step 2/6: Answer to questions
</div>
</div>
<div
id=
"plaintext_div"
style=
"display:none;"
>
<
h2>
Review your ballot
</h2
>
<
div
class=
"current_step"
>
Step 3/6: Review and encrypt
</div
>
<div
id=
"pretty_choices"
></div>
<div
style=
"display:none;"
>
Plaintext raw ballot:
...
...
@@ -58,6 +61,7 @@
</div>
<p>
Your ballot has been successfully encrypted,
<b>
but has not been cast yet
</b>
!
</p>
<p>
Your smart ballot tracker is
<span
id=
"ballot_tracker"
></span></p>
<p>
We invite you to save it in order to check later that it is taken into account.
</p>
<br/>
<input
type=
"submit"
value=
"Continue"
style=
"font-size:30px;"
/>
<br/><br/>
...
...
src/static/site.css
View file @
eeb8f3c4
...
...
@@ -31,3 +31,8 @@ ul {
button
{
cursor
:
pointer
;
}
.current_step
{
text-align
:
center
;
font-size
:
28px
;
padding-bottom
:
28px
;
}
src/web/web_templates.ml
View file @
eeb8f3c4
...
...
@@ -1263,6 +1263,9 @@ let cast_confirmation w hash () =
]
in
let
content
=
[
progress
;
div
~
a
:
[
a_class
[
"current_step"
]]
[
pcdata
"Step 5/6: Confirm"
;
];
p
[
pcdata
"Your ballot for "
;
em
[
pcdata
name
];
...
...
@@ -1299,23 +1302,27 @@ let cast_confirmed w ~result () =
b
[
pcdata
"Done"
];
hr
()
;
]
in
let
result
=
let
result
,
step_title
=
match
result
with
|
`Valid
hash
->
[
pcdata
" has been accepted, your smart ballot tracker is "
;
b
[
pcdata
hash
];
pcdata
".
We invite you to save it
an
d
check its presence in the "
;
pcdata
".
You c
an check its presence in the "
;
a
~
service
:
election_pretty_ballots
[
pcdata
"ballot box"
]
((
params
.
e_uuid
,
()
)
,
1
);
pcdata
"."
;
]
pcdata
"
anytime during the election
."
;
]
,
"Thank you for voting!"
|
`Error
e
->
[
pcdata
" is rejected, because "
;
pcdata
(
Web_common
.
explain_error
e
);
pcdata
"."
;
]
]
,
"FAIL!"
in
let
content
=
[
progress
;
div
~
a
:
[
a_class
[
"current_step"
]]
[
pcdata
"Step 6/6: "
;
pcdata
step_title
;
];
p
([
pcdata
"Your ballot for "
;
em
[
pcdata
name
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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