-
Notifications
You must be signed in to change notification settings - Fork 0
/
signup.html
148 lines (126 loc) · 5.5 KB
/
signup.html
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
{% extends "page.html" %}
{% block script %}
{{ super() }}
<script>
document.addEventListener('DOMContentLoaded', function() {
let button = document.getElementById('eye');
button.addEventListener("click", function(e) {
let pwd = document.getElementById("password_input");
let pwdc = document.getElementById("password_confirmation_input");
if (pwd.getAttribute("type") === "password") {
pwd.setAttribute("type", "text");
pwdc.setAttribute("type", "text");
button.textContent = "🔑";
} else {
pwd.setAttribute("type", "password");
pwdc.setAttribute("type", "password");
button.textContent = "👁";
}
});
});
{% if tos %}
document.addEventListener('DOMContentLoaded', function() {
let checkbox = document.getElementById('tos_check');
checkbox.addEventListener("click", function(e) {
let submit_button = document.getElementById("signup_submit");
submit_button.disabled = ! checkbox.checked;
});
});
{% endif %}
if (window.location.protocol === "http:") {
// unhide http warning
let warning = document.getElementById('insecure-login-warning');
warning.className = warning.className.replace(/\bhidden\b/, '');
}
</script>
{% if recaptcha_key %}
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
{% endif %}
{% endblock script %}
{% block main %}
{% block login %}
<div id="login-main" class="container">
<div style="text-align: center;">
<a href="https://landslides.openearthscape.org" target="_blank">
<img alt="CICESEG" style="width:50%;" src="https://raw.githubusercontent.com/csdms/ciceseg-management/main/ciceseg-logo-transparent.png">
</a>
</div>
<div style="text-align: center; margin-bottom:20px;">
<h1>Landslide Modeling Portal</h1>
</div>
<div style="margin-top:50px; padding-left:30%; padding-right:30%; text-align:center; font-size:90%;">
<p>The Collaborative Center for Landslides and Ground Failure Geohazards (CICESEG) is supported by the U.S. National Science Foundation.</p>
<a href="https://www.nsf.gov" target="_blank">
<img alt="National Science Foundation" style="width:50px;" src="https://raw.githubusercontent.com/csdms/ciceseg-management/main/nsf1.gif">
</a>
</div>
<form action="{{post_url}}" method="post" role="form" style="vertical-align:top;">
<div class="auth-form-header">
Sign Up For An Account
</div>
<div class='auth-form-body'>
<p id='insecure-login-warning' class='hidden'>
Warning: JupyterHub seems to be served over an unsecured HTTP connection.
We strongly recommend enabling HTTPS for JupyterHub.
</p>
{% if alert %}
<div class="alert {{alert}}" role="alert">
<p>
{{result_message}}
</p>
{% if two_factor_auth_user %}
<p>
<strong>Attention!</strong> You have configured two factor authentication.
Your two factor authentication code is <strong>{{ two_factor_auth_value }}</strong>.
</p>
{% endif %}
</div>
{% endif %}
<label for="username_input">Email address:</label>
<input id="username_input" type="text" name="username" val="{{username}}" autocapitalize="off" autocorrect="off" class="form-control" autofocus="autofocus" required />
<p></p>
{% if ask_email %}
<label for="email_input">Email:</label>
<input id="email_input" type="email" name="email" val="{{email}}" class="form-control" required />
<p></p>
{% endif %}
<label for="password_input">Choose a password:</label>
<div class="input-group">
<input id="password_input" type="password" name="signup_password" val="" autocapitalize="off" autocorrect="off" class="form-control" />
<span class="input-group-addon">
<button id="eye" type="button" style="border:0;">👁</button>
</span>
</div>
<p></p>
<label for="password_confirm">Confirm your password:</label>
<div class="input-group">
<input id="password_confirmation_input" type="password" name="signup_password_confirmation" val="" autocapitalize="off" autocorrect="off" class="form-control" />
</div>
<p></p>
{% if two_factor_auth %}
<input type="checkbox" id="2fa" name="2fa" value="2fa">
Setup two factor authentication
</input>
<p></p>
{% endif %}
{% if tos %}
<input type="checkbox" id="tos_check">
{{tos|safe}}
</input>
<p></p>
{% endif %}
{% if recaptcha_key %}
<div class="g-recaptcha" data-sitekey="{{ recaptcha_key }}"></div>
<p></p>
{% endif %}
<input type="submit" id="signup_submit" class='btn btn-jupyter' value='Create Account' {% if tos %}disabled{% endif %} />
<p></p>
<hr />
<p>
After creating an account, <a href="{{ base_url }}login">login</a> as an existing user.
</p>
</div>
</form>
</div>
{% endblock login %}
{% endblock main %}