Commit f539ab6f authored by Stephane Glondu's avatar Stephane Glondu

Remove election_set_featured

parent 92a8086a
......@@ -64,7 +64,6 @@ let election_setup_auth_genpwd = post_coservice ~fallback:election_setup ~post_p
let election_home = service ~path:["elections"] ~get_params:(suffix (uuid "uuid" ** suffix_const "")) ()
let election_admin = service ~path:["elections"] ~get_params:(suffix (uuid "uuid" ** suffix_const "admin")) ()
let election_login = service ~path:["elections"] ~get_params:(suffix_prod (uuid "uuid" ** suffix_const "login") (opt (string "service"))) ()
let election_set_featured = post_coservice ~fallback:election_admin ~post_params:(bool "featured") ()
let election_set_state = post_coservice ~fallback:election_admin ~post_params:(bool "state") ()
let election_update_credential = service ~path:["elections"] ~get_params:(suffix (uuid "uuid" ** suffix_const "update-cred")) ()
let election_update_credential_post = post_service ~fallback:election_update_credential ~post_params:(string "old_credential" ** string "new_credential") ()
......
......@@ -953,18 +953,6 @@ let () =
"This election does not exist yet. Please come back later." ()
>>= Html5.send)
let () =
Any.register
~service:election_set_featured
(fun (uuid, ()) featured ->
let uuid_s = Uuidm.to_string uuid in
lwt () =
if featured then Web_persist.add_featured_election uuid_s
else Web_persist.remove_featured_election uuid_s
in
Redirection.send
(preapply election_admin (uuid, ())))
let () =
Any.register
~service:election_admin
......
......@@ -888,13 +888,6 @@ let election_admin w ~is_featured state () =
let module W = (val w : WEB_ELECTION) in
let title = W.election.e_params.e_name ^ " — Administration" in
let uuid_s = Uuidm.to_string W.election.e_params.e_uuid in
let feature_form = post_form ~service:election_set_featured
(fun featured -> [
bool_checkbox ~name:featured ~checked:is_featured ();
pcdata "Feature this election ";
string_input ~input_type:`Submit ~value:"Apply" ();
]) (W.election.e_params.e_uuid, ())
in
let state_form checked =
post_form
~service:election_set_state
......@@ -1000,7 +993,6 @@ let election_admin w ~is_featured state () =
div [
a ~service:election_dir [pcdata "Voting records"] (uuid, ESRecords);
];
div [feature_form];
div [state_div];
] in
lwt login_box = site_login_box () in
......
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