Commit 34710872 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1821104: Disable logout link on click



So that it can't be clicked again during logout process

behatnotneeded

Change-Id: I3951fa174b933e3c730e66de49fd18e559e6d88a
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent deaeb2b7
......@@ -91,6 +91,10 @@
text-decoration:none;
color: $navbar-default-link-hover-color;
}
&.disabled {
color: $btn-link-disabled-color;
cursor: not-allowed;
}
@include media-breakpoint-up(md) {
border: 1px solid $navbar-default-border;
}
......
......@@ -162,10 +162,20 @@
</li>
{/foreach}
<li class="btn-logout has-icon">
<a href="{$WWWROOT}?logout" accesskey="l">
<a id="logoutbutton" href="{$WWWROOT}?logout" accesskey="l">
<span class="icon icon-sign-out" role="presentation" aria-hidden="true"></span>
<span class="nav-title">{str tag="logout"}</span>
</a>
<script>
$('#logoutbutton').click(function(e) {
if ($(this).hasClass('disabled')) {
e.preventDefault();
return false;
}
$(this).addClass('disabled');
return true;
});
</script>
</li>
{if $USERMASQUERADING && $LOGGEDIN}
<li class="backto-be-admin has-icon">
......
Supports Markdown
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