Log out: Difference between revisions
From ASDSO Dam Safety Toolbox
(Created page with "<html> <h1 class="firstHeading page-header">Log out</h1> <form method="post" class="mw-htmlform mw-htmlform-ooui oo-ui-layout oo-ui-formLayout"> <div class="mw-htmlform-ooui-header oo-ui-layout oo-ui-fieldLayout oo-ui-fieldLayout-align-top"> <div class="oo-ui-fieldLayout-body"> <div class="oo-ui-fieldLayout-field"> <label aria-disabled="false" aria-labelledby="ooui-php-1" class="oo-ui-widget oo-ui-widget-enabled oo-ui-labelElement-label oo...") |
No edit summary |
||
(37 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<html> | <html> | ||
< | <div id="confirmLogout"> | ||
<p>Do you want to log out?</p> | |||
<button type="button" onclick="logOut()" class="button" | |||
style="color: #fff; | |||
background-color: #36c; | |||
cursor: pointer; | |||
padding: 5px 12px; | |||
line-height: 1; | |||
border: 1px solid #36c; | |||
border-radius: 2px; | |||
< | transition: background-color 100ms,color 100ms,border-color 100ms,box-shadow 100ms; | ||
min-height: 35px; | |||
text-decoration: none;">Submit</button> | |||
</div> | |||
<div id="logoutSuccess" style="visibility: hidden;"> | |||
<p><strong>You are now logged out and will be redirected to the <a href="https://portal.damsafety.org">ASDSO Dam Safety Portal</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>Return to <a id="redirectUrl" href="/wiki/Main_Page">Main Page</a></p> --> | |||
</div> | |||
<script> | |||
</ | function setRedirects(){ | ||
var previousUrl = document.referrer; | |||
if (!previousUrl || previousUrl !== "") { | |||
document.getElementById("redirectUrl").href = previousUrl; | |||
var pageTitle = previousUrl.split("https://damtoolbox.org/wiki/").pop().replaceAll('_',' '); | |||
document.getElementById("redirectUrl").text = pageTitle; | |||
} | |||
} | |||
function logOut() { | |||
// Clear cookie by setting the expiration date to one day ago | |||
var myDate = new Date(); | |||
myDate.setDate(myDate.getDate()-1); | |||
document.cookie = "remoteUserEmail='';expires=" + myDate + ";domain=damtoolbox.org;path=/;secure"; | |||
// Navigate to Impexium site and logout there | |||
setTimeout(function() { | |||
window.location.href = 'https://portal.damsafety.org/account/logout.aspx'; | |||
}, 3000); | |||
// Show confirmation | |||
var x = document.getElementById("confirmLogout"); | |||
x.style.display = "none"; | |||
var y = document.getElementById("logoutSuccess"); | |||
y.style.visibility = "visible"; | |||
} | |||
//TODO: if we can figure out how to redirect from Impexium site use this | |||
//setRedirects(); | |||
</script> | |||
</html> | </html> |
Latest revision as of 12:52, 2 May 2023
Do you want to log out?
You are now logged out and will be redirected to the ASDSO Dam Safety Portal in a few seconds.