Skip to content

Commit fa288b8

Browse files
committed
chore(passport): add footer
1 parent db06489 commit fa288b8

11 files changed

Lines changed: 94 additions & 19 deletions

File tree

rootfs/api/settings/production.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,3 +384,6 @@
384384
EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD', '')
385385
EMAIL_USE_TLS = bool(strtobool(os.environ.get('EMAIL_USE_TLS', 'false')))
386386
EMAIL_USE_SSL = bool(strtobool(os.environ.get('EMAIL_USE_SSL', 'false')))
387+
388+
GOOGLE_RE_CAPTCHA_KEY = os.environ.get("GOOGLE_RE_CAPTCHA_KEY")
389+
GOOGLE_RE_CAPTCHA_SECRET = os.environ.get("GOOGLE_RE_CAPTCHA_SECRET")

rootfs/api/static/css/main.css

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ body {
77
margin: 0;
88
}
99

10+
.privacy {
11+
text-align: justify!important;
12+
}
13+
1014
.page-wrap {
1115
min-height: 100%;
1216
display: flex;
@@ -256,4 +260,47 @@ form li {
256260
.white-link {
257261
margin-left: 25px;
258262
color: #fff
263+
}
264+
265+
.logo-sfdc {
266+
display: block;
267+
margin: 0 auto;
268+
width: 100%;
269+
max-width: 430px;
270+
padding: 26.6666666667px 0;
271+
text-align: center;
272+
background: -webkit-linear-gradient(-360deg,rgba(255,255,255,0) 0,rgba(255,255,255,0.2) 50%,rgba(255,255,255,0) 100%);
273+
background: linear-gradient(90deg,rgba(255,255,255,0) 0,rgba(255,255,255,0.2) 50%,rgba(255,255,255,0) 100%);
274+
background-size: 100% 1px;
275+
background-repeat: no-repeat;
276+
}
277+
278+
.logo-sfdc a {
279+
display: block;
280+
color: #dcdae9;
281+
text-decoration: none;
282+
text-transform: uppercase;
283+
letter-spacing: .05em;
284+
font-size: 10px;
285+
font-weight: bold;
286+
}
287+
288+
.legal {
289+
list-style: none;
290+
margin-top: 40px;
291+
padding: 0;
292+
text-align: center;
293+
}
294+
295+
.legal li, .legal a {
296+
font-size: 12px;
297+
font-weight: bold;
298+
text-transform: none;
299+
letter-spacing: 0;
300+
color: #dcdae9;
301+
}
302+
303+
.legal li {
304+
display: inline-block;
305+
margin: 5px;
259306
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<footer class="logo-sfdc">
2+
<ul class="legal">
3+
<li><a href="https://legal.doopai.com" rel="nofollow">Legal Documents</a></li>
4+
<li><a href="https://legal.doopai.com/#/cloud-services-terms" rel="nofollow">Terms of Service</a></li>
5+
<li><a href="https://legal.doopai.com/#/doopai-privacy-policy" rel="nofollow">Privacy</a></li>
6+
<li><a href="https://legal.doopai.com/#/doopai-cookie-policy" rel="nofollow">Cookies</a></li>
7+
<li>© 2022 drycc.com</li></ul>
8+
</footer>

rootfs/api/templates/user/login.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,5 @@ <h2 class="h3">Log in to your account</h2>
3636
<a href="/user/password_reset/" class="white-link">Forgot your password?</a>
3737
{% endif %}
3838
</div>
39+
{% include "user/footer.html" %}
3940
</div>

rootfs/api/templates/user/message.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ <h2 class="h3">{% block title %}{% endblock %}</h2>
1515
<div class="inverted-wrapper"></div>
1616
</div>
1717
</div>
18+
{% include "user/footer.html" %}
1819
</div>

rootfs/api/templates/user/password_reset_confirm.html

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
{% load static %}
2-
2+
{% if validlink %}
33
<link rel="stylesheet" href="{% static 'css/main.css' %}" type="text/css">
44
<head>
55
<meta charset="UTF-8">
66
<title>Reset Password</title>
77
</head>
8-
9-
{% if validlink %}
10-
11-
128
<div class="page-wrap gradient-primary">
139
<div class="container">
1410
<div class="panel">
@@ -32,10 +28,8 @@ <h2 class="h3">{{ title }}</h2>
3228
</form>
3329
</div>
3430
</div>
31+
{% include "user/footer.html" %}
3532
</div>
36-
3733
{% else %}
38-
39-
<p>The password reset link was invalid, possibly because it has already been used. Please request a new password reset.</p>
40-
34+
{% include 'user/password_reset_fail.html' %}
4135
{% endif %}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% extends 'user/message.html' %}
2+
{% block title %}The password reset link was invalid{% endblock %}
3+
{% block message %}
4+
Possibly because it has already been used. Please request a new password reset.
5+
{% endblock %}

rootfs/api/templates/user/password_reset_form.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ <h2 class="h3">{{ title }}</h2>
2121
</form>
2222
</div>
2323
</div>
24+
{% include "user/footer.html" %}
2425
</div>
2526

rootfs/api/templates/user/registration.html

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ <h2 class="h3">Registration</h2>
1515
{% csrf_token %}
1616
<div class="form-group">
1717
<label for="username">{{ form.username.label_tag }}</label>
18-
<input autofocus="off" class="form-control" id="username" name="username" :placeholder="Username" type="text" >
18+
<input autofocus="off" class="form-control" id="username" name="username" :placeholder="Username" type="text" required>
1919
<div class="error">{{ form.username.errors }}</div>
2020
</div>
2121
<div class="form-group">
@@ -24,28 +24,38 @@ <h2 class="h3">Registration</h2>
2424
class="form-control"
2525
id="password1"
2626
name="password1"
27-
placeholder="{% if form.password1.help_text %}{{ form.password1.help_text|safe }}{% endif %}"
28-
type="password">
27+
placeholder="Password"
28+
type="password" required>
2929
<div class="error">{{ form.password1.errors }}</div>
3030
</div>
3131

3232
<div class="form-group">
3333
<label for="password2">{{ form.password2.label_tag }}</label>
3434
<input autofocus="off"
3535
class="form-control" id="password2" name="password2"
36-
placeholder="{% if form.password2.help_text %}{{ form.password2.help_text|safe }}{% endif %}"
37-
type="password">
36+
placeholder="Confirm password"
37+
type="password" required>
3838
<div class="error">{{ form.password2.errors }}</div>
3939
</div>
4040

4141
<div class="form-group">
4242
<label for="email">{{ form.email.label_tag }}</label>
4343
<input autofocus="off" class="form-control" id="email" name="email"
44-
:placeholder="Email" type="email">
44+
:placeholder="Email" type="email" required>
4545
<div class="error">{{ form.email.errors }}</div>
4646
</div>
47+
{% if google_re_captcha_key %}
48+
<div class="form-group">
49+
<script src="https://www.recaptcha.net/recaptcha/api.js" async defer></script>
50+
<div class="g-recaptcha" data-sitekey="6LfNBv8eAAAAAHCmD0cXDDB_a3vjxxVx_iNK3iyp"></div>
51+
</div>
52+
{% endif %}
4753
<button class="btn btn-primary btn-lg btn-block" id="submit" type="submit">Submit</button>
48-
54+
<div class="form-group">
55+
<p class="privacy">
56+
Signing up signifies that you have read and agree to the <a target="_blank" href="https://legal.doopai.com/#/cloud-services-terms">Terms of Service</a> and our <a target="_blank" href="https://legal.doopai.com/#/doopai-privacy-policy/">Privacy Policy</a>.
57+
</p>
58+
</div>
4959
</form>
5060
</div>
5161
</div>

rootfs/api/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
re_path(r'password_reset/done/?$',
2929
views.UserPasswordResetDoneView.as_view(),
3030
name='user_password_reset_done'),
31-
re_path(r'reset/<uidb64>/<token>/?$',
31+
re_path(r'reset/(?P<uidb64>.+)/(?P<token>.+)/?$',
3232
views.UserPasswordResetConfirmView.as_view(),
3333
name='user_password_reset_confirm'),
3434
re_path(r'reset/done/?$',

0 commit comments

Comments
 (0)