Commit 4e29f072 authored by Stephane Glondu's avatar Stephane Glondu Committed by Stéphane Glondu

On draft page, detect when all passwords have been sent

parent 8f6d3db2
......@@ -482,11 +482,14 @@ let election_draft uuid se () =
match auth with
| `Password ->
div [
pcdata "Authentication scheme: password ";
post_form ~service:election_draft_auth_genpwd
(fun () ->
[input ~input_type:`Submit ~value:"Generate and mail missing passwords" string]
) uuid;
pcdata "Authentication scheme: password";
if List.for_all (fun v -> v.sv_password <> None) se.se_voters then
div [pcdata "All passwords have been sent!"]
else
post_form ~service:election_draft_auth_genpwd
(fun () ->
[input ~input_type:`Submit ~value:"Generate and mail missing passwords" string]
) uuid;
]
| `Dummy ->
div [
......
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