Commit 3f9efc6f authored by Stephane Glondu's avatar Stephane Glondu

Automatic logout after a successful vote

parent f6552c10
......@@ -73,7 +73,6 @@ module type LocalizedStrings = sig
val thank_you_for_voting : string
val is_rejected_because : string
val fail : string
val logout_and_come_back : string
val administer_elections : string
val administer_this_election : string
val powered_by : string
......
......@@ -72,7 +72,6 @@ let confirmation_email = " Sie erhalten eine Bestätigung per E-Mail."
let thank_you_for_voting = "Vielen Dank für Ihre Stimme!"
let is_rejected_because = " wurde abgelehnt, da "
let fail = "FEHLER!"
let logout_and_come_back = "Abmelden und zurück zur Abstimmung"
let administer_elections = "Abstimmung verwalten"
let administer_this_election = "Diese Abstimmung verwalten"
let powered_by = "Powered by "
......
......@@ -72,7 +72,6 @@ let confirmation_email = " A confirmation e-mail has been sent to you."
let thank_you_for_voting = "Thank you for voting!"
let is_rejected_because = " is rejected, because "
let fail = "FAIL!"
let logout_and_come_back = "Log out and come back to election page"
let administer_elections = "Administer elections"
let administer_this_election = "Administer this election"
let powered_by = "Powered by "
......
......@@ -72,7 +72,6 @@ let confirmation_email = " Un e-mail de confirmation vous a été envoyé."
let thank_you_for_voting = "Merci pour votre participation !"
let is_rejected_because = " est refusé, parce que "
let fail = "ÉCHEC !"
let logout_and_come_back = "Se déconnecter et revenir à la page d'accueil de l'élection"
let administer_elections = "Administrer des élections"
let administer_this_election = "Administrer cette élection"
let powered_by = "Propulsé par "
......
......@@ -72,7 +72,6 @@ let confirmation_email = " Un e-mail de confirmare v-a fost trimis."
let thank_you_for_voting = "Vă mulțumim pentru participare!"
let is_rejected_because = " este resprins, deoarece "
let fail = "EȘEC!"
let logout_and_come_back = "Deconectați și reveniți la pagina de start a alegerii"
let administer_elections = "Administrează alegerile"
let administer_this_election = "Administrează această alegere"
let powered_by = "Realizat de "
......
......@@ -1012,6 +1012,7 @@ let () =
match%lwt Eliom_reference.get Web_state.cast_confirmed with
| Some result ->
Eliom_reference.unset Web_state.cast_confirmed >>
Eliom_reference.unset Web_state.user >>
T.cast_confirmed (module W) ~result () >>= Html5.send
| None ->
let%lwt state = Web_persist.get_election_state uuid_s in
......
......@@ -1622,13 +1622,11 @@ let cast_confirmed w ~result () =
pcdata L.your_ballot_for;
em [pcdata name];
] @ result);
p [
(let service = Eliom_service.preapply logout () in
a ~a:[a_id "logout"] ~service [
pcdata L.logout_and_come_back
] ());
pcdata ".";
];
p
[a
~service:Web_services.election_home
[pcdata L.go_back_to_election]
(params.e_uuid, ())];
] in
let uuid = params.e_uuid in
base ~title:name ~content ~uuid ()
......
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