forked from bimberlabinternal/BimberLabKeyModules
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlogin.html
More file actions
71 lines (69 loc) · 4.28 KB
/
login.html
File metadata and controls
71 lines (69 loc) · 4.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<script type="text/javascript" nonce="<%=scriptNonce%>">
(function($, LABKEY) {
$(function(){
// The intent of this block is to test whether the returnUrl is pointing to the same folder as the main mGAP project
// If true, always respect that.
// If the user is an admin, allow returnUrls to a different folder
// Otherwise, always point the user to the home page of the mGAP folder
var ctx = LABKEY.getModuleContext('mgap') || {};
var mgapFolder = ctx['MGAPContainer'];
if (mgapFolder) {
var returnUrl = LABKEY.ActionURL.getParameter('returnUrl')
if (returnUrl) {
returnUrl = decodeURIComponent(returnUrl)
var containerPath = LABKEY.ActionURL.getContainerName(returnUrl).toLowerCase()
mgapFolder = mgapFolder.replaceAll('/', '').toLowerCase()
if (LABKEY.Security.currentUser.isAdmin || containerPath === mgapFolder) {
$('#returnUrl').attr('value', returnUrl);
} else {
$('#returnUrl').attr('value', LABKEY.ActionURL.buildURL('project', 'start', mgapFolder));
}
}
}
else {
// Ignore the returnUrl in this case, since we cant tell whether it's from the expected project:
$('#returnUrl').attr('value', LABKEY.ActionURL.buildURL('project', 'start', 'home'));
}
});
}(jQuery, LABKEY));
</script>
<form class="auth-form" name="login" method="post">
<div class="auth-header">Sign In / Register</div>
<div style="max-width: 1000px;padding-top: 10px;">While mGAP is a free NIH-sponsored resource, we require users register to help us track and report usage to our funders. This information is critical to demonstrate the value and impact of the resource. Please <a href="<%=contextPath%>/mgap/home/requestLogin.view?">request an account</a> if you are not already registered. Thank you for your understanding.</div>
<div class="labkey-error" id="errors"></div>
<div class="auth-form-body">
<label for="email">Email</label>
<input id="email" name="email" type="text" class="input-block" tabindex="1" autocomplete="off">
<label for="password">
Password <a href="login-resetPassword.view?">(forgot password)</a>
</label>
<input id="password" name="password" type="password" class="input-block" tabindex="2" autocomplete="off">
<input tabindex="3" type="checkbox" name="remember" id="remember" checked> Remember my email address
<div class="termsOfUseSection" hidden>
<div class="auth-header auth-item">Terms of Use</div>
<div class="toucontent auth-item termsOfUseContent"></div>
<div class="auth-item">
<input type="checkbox" tabindex="4" name="approvedTermsOfUse" id="approvedTermsOfUse" class="auth-item">
<label for="approvedTermsOfUse">I agree to these terms</label>
</div>
</div>
<input type="hidden" name="termsOfUseType" id="termsOfUseType">
<div class="auth-item auth-credentials-submit">
<!-- Note: login.js attaches an authenticateUser() click event to elements with class "loginSubmitButton" -->
<input type="submit" tabindex="-1" class="loginSubmitButton"/>
<a tabindex="5" class="labkey-button primary signin-btn"><span>Sign In</span></a>
<span class="registrationSection">
<span class="register-text">or</span>
<a class="labkey-text-link" href="<%=contextPath%>/mgap/home/requestLogin.view?">Request an account</a>
</span>
</div>
<input type="hidden" id="returnUrl" name="returnUrl" value="">
<input type="hidden" id="urlhash" name="urlhash">
<input type="hidden" name='X-LABKEY-CSRF'>
<div style="margin-top: 10px;">Note to OHSU users: use your university login/password (once registered)</div>
</div>
</form>
<div class="otherLoginMechanismsSection" hidden>
<div class="auth-header">Registered users from the following institutions can log in using their home institution's credentials below:</div>
<div class="otherLoginMechanismsContent"></div>
</div>