-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathedit.html
More file actions
69 lines (64 loc) · 2.92 KB
/
Copy pathedit.html
File metadata and controls
69 lines (64 loc) · 2.92 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
{% extends "wagtailusers/users/edit.html" %}
{% block fields %}
{% if form.separate_username_field %}
{% include "wagtailadmin/shared/field.html" with field=form.username_field %}
{% endif %}
{% include "wagtailadmin/shared/field.html" with field=form.email %}
{% block extra_fields %}
{% include "wagtailadmin/shared/field.html" with field=form.display_name %}
{% include "wagtailadmin/shared/field.html" with field=form.first_name %}
{% include "wagtailadmin/shared/field.html" with field=form.last_name %}
{% include "wagtailadmin/shared/field.html" with field=form.terms_accepted %}
{# ---------- NEW FIELDS FROM USER SUBMISSION ---------- #}
<h3 class="w-mt-6 w-mb-2">Profile Info (from Registration Survey)</h3>
{% include "wagtailadmin/shared/field.html" with field=form.gender_edit %}
{% include "wagtailadmin/shared/field.html" with field=form.date_of_birth_edit %}
{% include "wagtailadmin/shared/field.html" with field=form.location_edit %}
<div class="w-field__wrapper " data-field-wrapper="">
<span class="w-field__label">
Notification Preference
</span>
<div class="w-field" data-field="">
{% if user.notificationpreference %}
<div style="display: flex; flex-direction: column;">
<div><b>Opted in: </b>
{% if user.notificationpreference.receive_notifications %}
Yes
{% else %}
No
{% endif %}
</div>
<div>
<b>Language: </b> {{ user.notificationpreference.get_preferred_language_display }}
</div>
{% if user.notificationpreference.content_tags.exists %}
<div>
<b>Tags: </b>
{{ user.notificationpreference.content_tags.all|join:", " }}
</div>
{% endif %}
<div>
<a href="{% url 'user_notifications_notificationpreference_modeladmin_edit' user.notificationpreference.id %}">
Edit
</a>
</div>
</div>
{% else %}
No preferences found.<br>
<a href="{% url 'user_notifications_notificationpreference_modeladmin_create' %}?user={{ user.id }}">
Add.
</a>
{% endif %}
</div>
</div>
{% endblock extra_fields %}
{% if form.password1 %}
{% include "wagtailadmin/shared/field.html" with field=form.password1 %}
{% endif %}
{% if form.password2 %}
{% include "wagtailadmin/shared/field.html" with field=form.password2 %}
{% endif %}
{% if form.is_active %}
{% include "wagtailadmin/shared/field.html" with field=form.is_active %}
{% endif %}
{% endblock fields %}