From 6d2ce94e3031e45c460dbe3b1255d96500bf6c4b Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 9 Jun 2022 18:52:32 +0100 Subject: [PATCH] . --- index.html | 2 +- js/main.js | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index d1d3365..0928dcc 100644 --- a/index.html +++ b/index.html @@ -65,7 +65,7 @@

RTS

- +
diff --git a/js/main.js b/js/main.js index da6c191..b97a3e6 100644 --- a/js/main.js +++ b/js/main.js @@ -240,6 +240,17 @@ async function loadExamList(data) { if (global_cid == null) { global_cid = "u-" + global_uid; } + + $("#btn-user-login").hide(); + + let logout = $("[x]") + logout.click(() => { + user_db.user.clear().then(() => { + window.location = "/accounts/logout/"; + return; + }); + }) + $("#user").append(logout); } @@ -2453,7 +2464,7 @@ $("#btn-candidate-login").click(function(evt) { }); $("#btn-user-login").click(function(evt) { - window.location = "https://www.penracourses.org.uk/accounts/login/?next=/rts" + window.location = "/accounts/login/?next=/rts" //$(".exam-wrapper").toggle(); });