Log out: Difference between revisions
From ASDSO Dam Safety Toolbox
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
<div id="confirmLogout"> | <div id="confirmLogout"> | ||
<p>Do you want to log out?</p> | <p>Do you want to log out?</p> | ||
<button type="button" onclick="logOut()" | <button type="button" onclick="logOut()" class="button" | ||
style="color: #fff; | style="color: #fff; | ||
background-color: #36c; | background-color: #36c; | ||
Line 14: | Line 13: | ||
min-height: 35px; | min-height: 35px; | ||
text-decoration: none;">Submit</button> | text-decoration: none;">Submit</button> | ||
</div> | </div> | ||
<div id="logoutSuccess" style="visibility: hidden;"> | <div id="logoutSuccess" style="visibility: hidden;"> | ||
<p><strong>You are now logged out and will be redirected to the <a href="https://asdso.mpxstage.com"> | <p><strong>You are now logged out and will be redirected to the <a href="https://asdso.mpxstage.com">staging site</a> in a few seconds.</strong></p> | ||
<!-- TODO: if we can figure out how to redirect from Impexium site use this instead of the above --> | |||
<!-- <p><strong>You are now logged out.</strong></p> | |||
<p><strong>You are now logged out.</strong></p> | <p>Return to <a id="redirectUrl" href="/wiki/Main_Page">Main Page</a></p> --> | ||
<p>Return to <a id="redirectUrl" href="/wiki/Main_Page">Main Page</a></p> | |||
</div> | </div> | ||
<script> | <script> | ||
function | function setRedirects(){ | ||
var previousUrl = document.referrer; | var previousUrl = document.referrer; | ||
if (!previousUrl || previousUrl !== "") { | if (!previousUrl || previousUrl !== "") { | ||
Line 52: | Line 33: | ||
function logOut() { | function logOut() { | ||
// Clear cookie by setting the expiration date to one day ago | // Clear cookie by setting the expiration date to one day ago | ||
var myDate = new Date(); | var myDate = new Date(); | ||
myDate.setDate(myDate.getDate()-1); | myDate.setDate(myDate.getDate()-1); | ||
Line 68: | Line 48: | ||
y.style.visibility = "visible"; | y.style.visibility = "visible"; | ||
} | } | ||
//TODO: if we can figure out how to redirect from Impexium site use this | |||
//setRedirects(); | |||
</script> | </script> | ||
</html> | </html> |
Revision as of 23:46, 17 April 2023
Do you want to log out?
You are now logged out and will be redirected to the staging site in a few seconds.