accrete 0.0.106__py3-none-any.whl → 0.0.109__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- accrete/contrib/ui/static/js/filter.js +1 -0
- accrete/contrib/ui/templates/ui/filter/filter.html +2 -2
- accrete/contrib/ui/templates/ui/layout.html +26 -16
- accrete/contrib/ui/templates/ui/table.html +3 -3
- accrete/contrib/user/forms.py +1 -1
- accrete/contrib/user/templates/user/change_email.html +22 -27
- accrete/contrib/user/templates/user/change_password.html +24 -36
- accrete/contrib/user/templates/user/login.html +4 -3
- accrete/contrib/user/templates/user/user_form.html +50 -52
- accrete/contrib/user/urls.py +2 -3
- accrete/contrib/user/views.py +39 -46
- {accrete-0.0.106.dist-info → accrete-0.0.109.dist-info}/METADATA +1 -1
- {accrete-0.0.106.dist-info → accrete-0.0.109.dist-info}/RECORD +15 -16
- accrete/contrib/user/templates/user/user_detail.html +0 -43
- {accrete-0.0.106.dist-info → accrete-0.0.109.dist-info}/WHEEL +0 -0
- {accrete-0.0.106.dist-info → accrete-0.0.109.dist-info}/licenses/LICENSE +0 -0
@@ -14,6 +14,7 @@ document.addEventListener('alpine:init', () => {
|
|
14
14
|
const queryApplyEvent = new Event('click');
|
15
15
|
const query = queryString || JSON.stringify(this.buildJsonQueryFromHtml());
|
16
16
|
url.searchParams.set('q', query);
|
17
|
+
url.searchParams.set('page', '1');
|
17
18
|
queryApply.setAttribute('hx-get', url.toString());
|
18
19
|
htmx.process(queryApply);
|
19
20
|
queryApply.dispatchEvent(queryApplyEvent);
|
@@ -4,7 +4,7 @@
|
|
4
4
|
{% load ui %}
|
5
5
|
{% load partials %}
|
6
6
|
|
7
|
-
<div id="filter" x-data="filter"
|
7
|
+
<div id="filter" x-data="filter">
|
8
8
|
|
9
9
|
<div id="query-tags" x-ref="queryTags" class="mb-1">
|
10
10
|
{{ filter.query_tags }}
|
@@ -14,7 +14,7 @@
|
|
14
14
|
{{ filter.query_input }}
|
15
15
|
</div>
|
16
16
|
|
17
|
-
<div
|
17
|
+
<div class="mb-6" style="width: 100%" x-show="showParams" x-cloak="" x-on:click.outside="showParams = false;" x-transition.duration.150ms>
|
18
18
|
{{ filter.query_params }}
|
19
19
|
</div>
|
20
20
|
|
@@ -14,37 +14,50 @@
|
|
14
14
|
<link rel="stylesheet" type="text/css" href="{% static "css/accrete.css" %}?v=1">
|
15
15
|
<link rel="stylesheet" type="text/css" href="{% static "css/icons.css" %}">
|
16
16
|
<link rel="stylesheet" type="text/css" href="{% static "css/fa.css" %}">
|
17
|
-
|
17
|
+
|
18
18
|
<script src="{% static "js/filter.js" %}" type="text/javascript"></script>
|
19
19
|
<script src="{% static "js/htmx.min.js" %}" defer type="text/javascript"></script>
|
20
20
|
<script src="{% static "js/alpine-sort3.14.1.js" %}" defer type="text/javascript"></script>
|
21
21
|
<script src="{% static "js/alpine3.14.1.js" %}" defer type="text/javascript"></script>
|
22
22
|
<script defer>
|
23
23
|
document.addEventListener("setTenant", function(evt){
|
24
|
-
document.body.setAttribute(
|
24
|
+
document.body.setAttribute('data-tenant-id', evt.detail.value);
|
25
25
|
})
|
26
26
|
document.addEventListener('htmx:configRequest', function (evt) {
|
27
27
|
evt.detail.headers['X-TENANT-ID'] = getTenant();
|
28
28
|
})
|
29
|
+
document.addEventListener('htmx:afterRequest', function(evt) {
|
30
|
+
const url = new URL(window.location);
|
31
|
+
url.searchParams.set('tenant_id', document.body.getAttribute('data-tenant-id'));
|
32
|
+
history.replaceState(null, '', url);
|
33
|
+
})
|
29
34
|
function getTenant() {
|
30
35
|
return document.body.getAttribute('data-tenant-id')
|
31
36
|
}
|
37
|
+
window.addEventListener('DOMContentLoaded', (event) => {
|
38
|
+
const url = new URL(window.location);
|
39
|
+
if (!document.body.getAttribute('data-tenant-id') && url.searchParams.get('tenant_id')) {
|
40
|
+
document.body.setAttribute('data-tenant-id', url.searchParams.get('tenant_id'));
|
41
|
+
}
|
42
|
+
})
|
32
43
|
</script>
|
33
44
|
<title>{% block title %}{{ title }} | HRP{% endblock %}</title>
|
34
45
|
{% endblock %}
|
35
46
|
</head>
|
36
47
|
|
37
48
|
{% block body %}
|
38
|
-
<body hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' data-tenant-id="{{ tenant.id }}" hx-boost="true" hx-history="false"
|
49
|
+
<body hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' data-tenant-id="{{ tenant.id }}" hx-boost="true" hx-history="false"
|
50
|
+
x-data="{ showPanel: false, openPanel() { if(window.innerWidth >= 1216) {this.showPanel = true} } }"
|
51
|
+
>
|
39
52
|
<nav id="navbar" class="navbar is-success is-fixed-top" role="navigation" aria-label="main navigation">
|
40
53
|
<div class="navbar-brand">
|
41
|
-
<div class="navbar-item is-hidden-widescreen pr-2" x-on:click="$dispatch('toggle-panel')">
|
54
|
+
<div class="navbar-item is-hidden-widescreen pr-2" x-on:click.stop="$dispatch('toggle-panel')">
|
42
55
|
<button>
|
43
56
|
<i class="fa fa-indent" x-show="!showPanel"></i>
|
44
57
|
<i class="fa fa-outdent" x-show="showPanel"></i>
|
45
58
|
</button>
|
46
59
|
</div>
|
47
|
-
<div class="navbar-item is-unselectable
|
60
|
+
<div class="navbar-item is-unselectable"
|
48
61
|
onclick="document.getElementById('tenant-quick-switch').classList.toggle('is-invisible')"
|
49
62
|
>
|
50
63
|
{{ request.tenant.name }}
|
@@ -71,7 +84,7 @@
|
|
71
84
|
<div class="navbar-end">
|
72
85
|
{% block navbar_end %}
|
73
86
|
<div class="navbar-item has-dropdown" onclick="this.classList.toggle('is-active');">
|
74
|
-
<a class="navbar-link is-arrowless">{{ user }}</a>
|
87
|
+
<a id="navbar-user-name" class="navbar-link is-arrowless">{{ user }}</a>
|
75
88
|
<div id="navbar-end-dropdown" class="navbar-dropdown is-right">
|
76
89
|
<a class="navbar-item" href="{% url 'teams:teams_list' %}">{% translate 'Teams' %}</a>
|
77
90
|
<hr class="navbar-divider">
|
@@ -88,14 +101,11 @@
|
|
88
101
|
</div>
|
89
102
|
</nav>
|
90
103
|
|
91
|
-
<div class="is-flex" style="padding-top: var(--bulma-navbar-height); height: 100svh;"
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
<div id="action-panel" x-show="showPanel"
|
97
|
-
@resize.debounce.100.window="openPanel()"
|
98
|
-
@toggle-panel.window="showPanel = !showPanel"
|
104
|
+
<div class="is-flex" style="padding-top: var(--bulma-navbar-height); height: 100svh;" x-init="showPanel = window.innerWidth >= 1216;">
|
105
|
+
<div x-show="showPanel" >
|
106
|
+
<div id="action-panel" x-show="showPanel"
|
107
|
+
@resize.debounce.100.window="openPanel()"
|
108
|
+
@toggle-panel.window="showPanel = !showPanel"
|
99
109
|
x-transition.duration.200ms
|
100
110
|
>
|
101
111
|
<nav class="px-1" style="height: 100%; overflow-y: auto; position: sticky; top: 0">
|
@@ -108,7 +118,7 @@
|
|
108
118
|
<div class="p-3">
|
109
119
|
{% include 'ui/filter/filter.html' %}
|
110
120
|
</div>
|
111
|
-
|
121
|
+
|
112
122
|
</div>
|
113
123
|
{% endif %}
|
114
124
|
</nav>
|
@@ -124,7 +134,7 @@
|
|
124
134
|
style="overflow: hidden; height: calc(100svh - var(--bulma-navbar-height))"
|
125
135
|
>
|
126
136
|
|
127
|
-
<div id="content-left-container" class="table-container is-flex is-flex-grow-1 is-flex-direction-column mb-
|
137
|
+
<div id="content-left-container" class="table-container is-flex is-flex-grow-1 is-flex-direction-column mb-0" x-bind:class="showContentRight ? 'is-hidden-mobile' : ''">
|
128
138
|
<div id="content-left-header">
|
129
139
|
<div class="is-flex is-justify-content-space-between is-flex-wrap-wrap">
|
130
140
|
<div class="is-flex is-flex-wrap-wrap is-flex-grow-5 is-align-self-center py-2">
|
@@ -4,7 +4,7 @@
|
|
4
4
|
{% load partials %}
|
5
5
|
|
6
6
|
{% block content_left %}
|
7
|
-
<table id="content-table" class="table can-compact is-fullwidth is-hoverable is-narrow
|
7
|
+
<table id="content-table" class="table can-compact is-fullwidth is-hoverable is-narrow my-0" hx-indicator=".htmx-indicator" x-data="">
|
8
8
|
<thead style="position: sticky; top: 0; z-index: 10; background-color: var(--bulma-scheme-main)">
|
9
9
|
<tr>
|
10
10
|
<th>{{ object_label }}</th>
|
@@ -42,7 +42,7 @@
|
|
42
42
|
<tfoot style="position: sticky; bottom: 0; z-index: 10; background-color: var(--bulma-scheme-main);" class="has-text-weight-bold">
|
43
43
|
<tr id="tf-row">
|
44
44
|
{% partialdef tf inline=True %}
|
45
|
-
<td></td>
|
45
|
+
<td class="p-0"></td>
|
46
46
|
{% for field in fields %}
|
47
47
|
{% if field in footer %}
|
48
48
|
<td style="text-align: {{ queryset|table_alignment:field }}">
|
@@ -52,7 +52,7 @@
|
|
52
52
|
</span>
|
53
53
|
</td>
|
54
54
|
{% else %}
|
55
|
-
<td></td>
|
55
|
+
<td class="p-0"></td>
|
56
56
|
{% endif %}
|
57
57
|
{% endfor %}
|
58
58
|
{% endpartialdef %}
|
accrete/contrib/user/forms.py
CHANGED
@@ -1,29 +1,24 @@
|
|
1
|
-
{% extends 'ui/
|
1
|
+
{% extends 'ui/modal.html' %}
|
2
|
+
{% load i18n %}
|
2
3
|
|
3
|
-
{% block
|
4
|
-
<form id="form"
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
</
|
15
|
-
</
|
16
|
-
</
|
17
|
-
<div class="columns">
|
18
|
-
<div class="column is-6">
|
19
|
-
<label class="label has-field is-required">
|
20
|
-
{{ form.password.label_tag }}
|
21
|
-
<span class="has-text-danger is-size-7">{{ form.password.errors }}</span>
|
22
|
-
<div class="field">
|
23
|
-
<p class="control is-fullwidth">{{ form.password }}</p>
|
24
|
-
</div>
|
25
|
-
</label>
|
26
|
-
</div>
|
27
|
-
</div>
|
28
|
-
</form>
|
4
|
+
{% block modal_content %}
|
5
|
+
<form id="{{ modal_id }}-form" hx-post="{% url 'user:change_email' %}">
|
6
|
+
{% csrf_token %}
|
7
|
+
<label class="label has-field is-required">
|
8
|
+
{{ form.email.label }}
|
9
|
+
{{ form.email }}
|
10
|
+
<span class="has-text-danger is-size-7">{{ form.email.errors }}</span>
|
11
|
+
</label>
|
12
|
+
<label class="label has-field is-required">
|
13
|
+
{{ form.password.label }}
|
14
|
+
{{ form.password }}
|
15
|
+
<span class="has-text-danger is-size-7">{{ form.password.errors }}</span>
|
16
|
+
</label>
|
17
|
+
</form>
|
29
18
|
{% endblock %}
|
19
|
+
|
20
|
+
{% block modal_buttons %}
|
21
|
+
<button type="submit" form="{{ modal_id }}-form" class="button is-success">{% translate 'Save' %}</button>
|
22
|
+
{{ block.super }}
|
23
|
+
{% endblock %}
|
24
|
+
|
@@ -1,40 +1,28 @@
|
|
1
|
-
{% extends 'ui/
|
1
|
+
{% extends 'ui/modal.html' %}
|
2
|
+
{% load i18n %}
|
2
3
|
|
3
|
-
{% block
|
4
|
-
<form id="form"
|
4
|
+
{% block modal_content %}
|
5
|
+
<form id="{{ modal_id }}-form" hx-post="{% url 'user:change_password' %}">
|
5
6
|
{% csrf_token %}
|
6
|
-
<
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<span class="has-text-danger is-size-7">{{ form.new_password.errors }}</span>
|
22
|
-
<div class="field">
|
23
|
-
<p class="control is-fullwidth">{{ form.new_password }}</p>
|
24
|
-
</div>
|
25
|
-
</label>
|
26
|
-
</div>
|
27
|
-
</div>
|
28
|
-
<div class="columns">
|
29
|
-
<div class="column is-6">
|
30
|
-
<label class="label has-field is-required">
|
31
|
-
{{ form.new_password_confirm.label_tag }}
|
32
|
-
<span class="has-text-danger is-size-7">{{ form.new_password_confirm.errors }}</span>
|
33
|
-
<div class="field">
|
34
|
-
<p class="control is-fullwidth">{{ form.new_password_confirm }}</p>
|
35
|
-
</div>
|
36
|
-
</label>
|
37
|
-
</div>
|
38
|
-
</div>
|
7
|
+
<label class="label">
|
8
|
+
{{ form.old_password.label }}
|
9
|
+
{{ form.old_password }}
|
10
|
+
<span class="has-text-danger is-size-7">{{ form.old_password.errors }}</span>
|
11
|
+
</label>
|
12
|
+
<label class="label has-field is-required">
|
13
|
+
{{ form.new_password.label }}
|
14
|
+
{{ form.new_password }}
|
15
|
+
<span class="has-text-danger is-size-7">{{ form.new_password.errors }}</span>
|
16
|
+
</label>
|
17
|
+
<label class="label has-field is-required">
|
18
|
+
{{ form.new_password_confirm.label }}
|
19
|
+
{{ form.new_password_confirm }}
|
20
|
+
<span class="has-text-danger is-size-7">{{ form.new_password_confirm.errors }}</span>
|
21
|
+
</label>
|
39
22
|
</form>
|
40
23
|
{% endblock %}
|
24
|
+
|
25
|
+
{% block modal_buttons %}
|
26
|
+
<button type="submit" form="{{ modal_id }}-form" class="button is-success">{% translate 'Save' %}</button>
|
27
|
+
{{ block.super }}
|
28
|
+
{% endblock %}
|
@@ -42,16 +42,17 @@
|
|
42
42
|
<div class="hero-body">
|
43
43
|
<div class="container">
|
44
44
|
<div class="columns">
|
45
|
-
<div class="column box is-8-tablet is-offset-2-tablet is-6-desktop is-offset-3-desktop is-4-fullhd is-offset-4-fullhd p-3">
|
45
|
+
<div class="column box is-8-tablet is-offset-2-tablet is-6-desktop is-offset-3-desktop is-4-fullhd is-offset-4-fullhd p-3" data-theme="light">
|
46
46
|
<form method="POST" action="" hx-boost="false">
|
47
47
|
{% csrf_token %}
|
48
48
|
<span class="has-text-danger is-size-7">{{ form.non_field_errors }}</span>
|
49
49
|
<label class="label">
|
50
|
-
{{ form.username.label_tag }}
|
50
|
+
<span class="has-text-black">{{ form.username.label_tag }}</span>
|
51
51
|
{{ form.username }}
|
52
52
|
<span class="has-text-danger is-size-7">{{ form.username.errors }}</span>
|
53
53
|
</label>
|
54
|
-
<label class="label">
|
54
|
+
<label class="label">
|
55
|
+
<span class="has-text-black">{{ form.password.label_tag }}</span>
|
55
56
|
{{ form.password }}
|
56
57
|
<span class="has-text-danger is-size-7">{{ form.password.errors }}</span>
|
57
58
|
</label>
|
@@ -1,56 +1,54 @@
|
|
1
|
-
{% extends 'ui/
|
1
|
+
{% extends 'ui/layout.html' %}
|
2
2
|
{% load i18n %}
|
3
3
|
|
4
|
-
{% block
|
5
|
-
|
6
|
-
{%
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
<p class="control is-expanded">{{ form.username }}</p>
|
14
|
-
</div>
|
15
|
-
</label>
|
16
|
-
</div>
|
17
|
-
</div>
|
18
|
-
|
19
|
-
<div class="columns">
|
20
|
-
<div class="column is-6">
|
21
|
-
<label class="label has-field">
|
22
|
-
{{ form.first_name.label }}
|
23
|
-
<span class="has-text-danger is-size-7">{{ form.first_name.errors }}</span>
|
24
|
-
<div class="field">
|
25
|
-
<p class="control is-fullwidth is-expanded">{{ form.first_name }}</p>
|
26
|
-
</div>
|
27
|
-
|
28
|
-
</label>
|
29
|
-
</div>
|
30
|
-
</div>
|
31
|
-
|
32
|
-
<div class="columns">
|
33
|
-
<div class="column is-6">
|
34
|
-
<label class="label has-field">
|
35
|
-
{{ form.last_name.label }}
|
36
|
-
<span class="has-text-danger is-size-7">{{ form.last_name.errors }}</span>
|
37
|
-
<div class="field">
|
38
|
-
<p class="control is-fullwidth is-expanded">{{ form.last_name }}</p>
|
39
|
-
</div>
|
40
|
-
</label>
|
41
|
-
</div>
|
42
|
-
</div>
|
4
|
+
{% block header_left %}
|
5
|
+
{{ block.super }}
|
6
|
+
<button class="button p-2 my-1 mr-1 is-light" hx-get="{% url 'user:change_password' %}" hx-target="body" hx-swap="beforeend">
|
7
|
+
<span>{% translate 'Change Password' %}</span>
|
8
|
+
</button>
|
9
|
+
<button class="button p-2 my-1 mr-1 is-light" hx-get="{% url 'user:change_email' %}" hx-target="body" hx-swap="beforeend">
|
10
|
+
<span>{% translate 'Change E-Mail' %}</span>
|
11
|
+
</button>
|
12
|
+
{% endblock %}
|
43
13
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
<
|
51
|
-
|
52
|
-
|
14
|
+
{% block content_left %}
|
15
|
+
<form id="user-form" hx-post="{% url 'user:detail' %}" hx-trigger="change changed" hx-select="#user-form" hx-swap="outerHTML" hx-select-oob="#navbar-user-name">
|
16
|
+
{% csrf_token %}
|
17
|
+
<div class="columns m-0">
|
18
|
+
<div class="column is-6">
|
19
|
+
{% if form.save_error or form.non_field_errors %}
|
20
|
+
<div class="notification is-danger is-light">
|
21
|
+
{{ form.save_error|default_if_none:'' }}
|
22
|
+
{{ form.non_field_errors|default_if_none:'' }}
|
23
|
+
</div>
|
24
|
+
{% endif %}
|
25
|
+
<label class="label">
|
26
|
+
{{ form.username.label }}
|
27
|
+
{{ form.username }}
|
28
|
+
<span class="has-text-danger is-size-7">{{ form.username.errors }}</span>
|
29
|
+
</label>
|
30
|
+
<label class="label">
|
31
|
+
{{ form.first_name.label }}
|
32
|
+
{{ form.first_name }}
|
33
|
+
<span class="has-text-danger is-size-7">{{ form.first_name.errors }}</span>
|
34
|
+
</label>
|
35
|
+
<label class="label">
|
36
|
+
{{ form.last_name.label }}
|
37
|
+
{{ form.last_name }}
|
38
|
+
<span class="has-text-danger is-size-7">{{ form.last_name.errors }}</span>
|
39
|
+
</label>
|
40
|
+
<label class="label">
|
41
|
+
{{ form.language_code.label }}
|
42
|
+
{{ form.language_code }}
|
43
|
+
<span class="has-text-danger is-size-7">{{ form.language_code.errors }}</span>
|
44
|
+
</label>
|
45
|
+
<label class="label">
|
46
|
+
{% translate 'E-Mail' %}
|
47
|
+
<div class="field has-addons">
|
48
|
+
<p class="control input has-text-weight-normal">{{ user.email }}</p>
|
49
|
+
</div>
|
50
|
+
</label>
|
51
|
+
</div>
|
53
52
|
</div>
|
54
|
-
</
|
55
|
-
|
56
|
-
{% endblock %}
|
53
|
+
</form>
|
54
|
+
{% endblock %}
|
accrete/contrib/user/urls.py
CHANGED
@@ -7,7 +7,6 @@ urlpatterns = [
|
|
7
7
|
path('login/', views.LoginView.as_view(), name='login'),
|
8
8
|
path('logout/', views.LogoutView.as_view(), name='logout'),
|
9
9
|
path('detail/', views.user_detail, name='detail'),
|
10
|
-
path('
|
11
|
-
path('
|
12
|
-
path('edit/email', views.user_change_email, name='edit_email')
|
10
|
+
path('password/', views.user_change_password, name='change_password'),
|
11
|
+
path('email/', views.user_change_email, name='change_email')
|
13
12
|
]
|
accrete/contrib/user/views.py
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
from django.contrib.auth.forms import AuthenticationForm
|
2
2
|
from django.contrib.auth import views, update_session_auth_hash
|
3
3
|
from django.contrib.auth.decorators import login_required
|
4
|
-
from django.
|
5
|
-
from django.shortcuts import redirect, render, reverse, resolve_url
|
4
|
+
from django.shortcuts import redirect, render, resolve_url
|
6
5
|
from django.utils.translation import gettext_lazy as _
|
7
6
|
from django.conf import settings
|
8
7
|
|
@@ -36,21 +35,6 @@ class LogoutView(views.LogoutView):
|
|
36
35
|
|
37
36
|
@login_required()
|
38
37
|
def user_detail(request):
|
39
|
-
ctx = ui.DetailContext(
|
40
|
-
title=_('Preferences'),
|
41
|
-
object=request.user,
|
42
|
-
breadcrumbs=[],
|
43
|
-
actions=[
|
44
|
-
ui.ClientAction(_('Edit'), url=reverse('user:edit')),
|
45
|
-
ui.ClientAction(_('Change E-Mail'), url=reverse('user:edit_email')),
|
46
|
-
ui.ClientAction(_('Change Password'), url=reverse('user:edit_password'))
|
47
|
-
]
|
48
|
-
).dict()
|
49
|
-
return render(request, 'user/user_detail.html', ctx)
|
50
|
-
|
51
|
-
|
52
|
-
@login_required()
|
53
|
-
def user_edit(request):
|
54
38
|
form = UserForm(
|
55
39
|
initial={'language_code': request.user.language_code},
|
56
40
|
instance=request.user
|
@@ -58,12 +42,13 @@ def user_edit(request):
|
|
58
42
|
if request.method == 'POST':
|
59
43
|
form = save_form(UserForm(request.POST, instance=request.user))
|
60
44
|
if form.is_saved:
|
61
|
-
return redirect('user:detail')
|
62
|
-
ctx = ui.
|
63
|
-
title=_('Preferences'),
|
64
|
-
|
65
|
-
|
66
|
-
|
45
|
+
return redirect(resolve_url('user:detail') + f'?{request.GET.urlencode()}')
|
46
|
+
ctx = ui.Context(
|
47
|
+
title=_('User Preferences'),
|
48
|
+
extra=dict(
|
49
|
+
user=request.user,
|
50
|
+
form=form
|
51
|
+
)
|
67
52
|
).dict()
|
68
53
|
return render(request, 'user/user_form.html', ctx)
|
69
54
|
|
@@ -71,42 +56,50 @@ def user_edit(request):
|
|
71
56
|
@login_required()
|
72
57
|
def user_change_password(request):
|
73
58
|
form = ChangePasswordForm(instance=request.user)
|
59
|
+
ctx = ui.ModalContext(
|
60
|
+
title=_('Change Password'),
|
61
|
+
modal_id='change-password',
|
62
|
+
blocking=True,
|
63
|
+
extra=dict(
|
64
|
+
form=form,
|
65
|
+
user=request.user
|
66
|
+
)
|
67
|
+
).dict()
|
74
68
|
if request.method == 'POST':
|
75
69
|
form = save_form(ChangePasswordForm(request.POST, instance=request.user))
|
76
70
|
if form.is_saved:
|
77
71
|
update_session_auth_hash(request, form.instance)
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
fail_silently=True
|
72
|
+
return redirect(
|
73
|
+
resolve_url('user:detail')
|
74
|
+
+ f'?{request.GET.urlencode()}'
|
82
75
|
)
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
actions=ui.form_actions(reverse('user:detail'))
|
89
|
-
).dict()
|
76
|
+
ctx.update(form=form)
|
77
|
+
res = render(request, 'user/change_password.html', ctx)
|
78
|
+
res.headers['HX-Retarget'] = f'#{ctx["modal_id"]}'
|
79
|
+
res.headers['HX-Reswap'] = 'outerHTML'
|
80
|
+
return res
|
90
81
|
return render(request, 'user/change_password.html', ctx)
|
91
82
|
|
92
83
|
|
93
84
|
@login_required()
|
94
85
|
def user_change_email(request):
|
95
86
|
form = ChangeEmailForm(instance=request.user)
|
87
|
+
ctx = ui.ModalContext(
|
88
|
+
title=_('Change E-Mail'),
|
89
|
+
modal_id='change-email',
|
90
|
+
blocking=True,
|
91
|
+
extra=dict(
|
92
|
+
form=form,
|
93
|
+
user=request.user
|
94
|
+
)
|
95
|
+
).dict()
|
96
96
|
if request.method == 'POST':
|
97
97
|
form = save_form(ChangeEmailForm(request.POST, instance=request.user))
|
98
98
|
if form.is_saved:
|
99
|
-
messages.add_message(
|
100
|
-
request, messages.SUCCESS,
|
101
|
-
str(_('Your email address has been changed.')),
|
102
|
-
fail_silently=True
|
103
|
-
)
|
104
99
|
return redirect('user:detail')
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
actions=ui.form_actions(reverse('user:detail'))
|
111
|
-
).dict()
|
100
|
+
ctx.update(form=form)
|
101
|
+
res = render(request, 'user/change_email.html', ctx)
|
102
|
+
res.headers['HX-Retarget'] = f'#{ctx["modal_id"]}'
|
103
|
+
res.headers['HX-Reswap'] = 'outerHTML'
|
104
|
+
return res
|
112
105
|
return render(request, 'user/change_email.html', ctx)
|
@@ -284,7 +284,7 @@ accrete/contrib/ui/static/icons/Logo.svg,sha256=hGZuxrAa-LRpFavFiF8Lnc7X9OQcqmb6
|
|
284
284
|
accrete/contrib/ui/static/icons/accrete.svg,sha256=CWHJKIgk3hxL7xIaFSz2j1cK-eF1TroCbjcF58bgOIs,1024
|
285
285
|
accrete/contrib/ui/static/js/alpine-sort3.14.1.js,sha256=tFKFh4yWJOYN69Holh9DDjSctbLmWsWgHQLDroJAnjw,38101
|
286
286
|
accrete/contrib/ui/static/js/alpine3.14.1.js,sha256=NY2a-7GrW--i9IBhowd25bzXcH9BCmBrqYX5i8OxwDQ,44659
|
287
|
-
accrete/contrib/ui/static/js/filter.js,sha256=
|
287
|
+
accrete/contrib/ui/static/js/filter.js,sha256=XZ9BDoIwXM1jVp1uvefbbnua2sJ9Y1EVraeDuzQIm8Y,4578
|
288
288
|
accrete/contrib/ui/static/js/htmx.min.js,sha256=SRlVzRgQdH19e5zLk2QAr7dg4G0l1T5FcrZLZWOyeE4,50387
|
289
289
|
accrete/contrib/ui/static/webfonts/fa-brands-400.ttf,sha256=VlbVlrxZcWWkIYL2eyufF9KuR6nj7xsEK5pylzlzBwU,207972
|
290
290
|
accrete/contrib/ui/static/webfonts/fa-brands-400.woff2,sha256=OokkzVIDooYocWrttc7wlD2kw7ROP_zukKsGOHtBxJA,117372
|
@@ -303,15 +303,15 @@ accrete/contrib/ui/templates/django/forms/widgets/select.html,sha256=uSfDpOQox2m
|
|
303
303
|
accrete/contrib/ui/templates/django/forms/widgets/text.html,sha256=MSmLlQc7PsPoDLVtTOOiWNprrsPriNr712yFxaHyDIo,47
|
304
304
|
accrete/contrib/ui/templates/django/forms/widgets/textarea.html,sha256=c9BTedqb3IkXLyVYd0p9pR8DFnsXCNGoxVBWZTk_Fic,278
|
305
305
|
accrete/contrib/ui/templates/ui/content_right.html,sha256=XUF1tYpSKfO9FleYtJ2QmWPmwdLYxLHXdBLRa-BrFUs,221
|
306
|
-
accrete/contrib/ui/templates/ui/layout.html,sha256=
|
306
|
+
accrete/contrib/ui/templates/ui/layout.html,sha256=wNLOr9PlPQNhfdYmzm44NPAPFU-DwbFyZtg-2Mo_wjU,12355
|
307
307
|
accrete/contrib/ui/templates/ui/list.html,sha256=mXsTQdGXJUQ4qe1_QIU2uCcy5KHSEnueJPA_cb1NY0M,2247
|
308
308
|
accrete/contrib/ui/templates/ui/list_update.html,sha256=mLQTCgkKfVI5jrgei-Upc1u87iXL0Q63uLzXHPwMyeo,110
|
309
309
|
accrete/contrib/ui/templates/ui/message.html,sha256=t3bZ5EE7IgQYJroCdLKFeUkZiNbgKkErVYQm6Y3IKpg,532
|
310
310
|
accrete/contrib/ui/templates/ui/modal.html,sha256=9Gnj5qhIJrnAPgAuIUkrSWeuYyKppywvmK1483AMhxY,1870
|
311
311
|
accrete/contrib/ui/templates/ui/oob.html,sha256=lZHIBBYclefbGkKguS1A7vrtOhODJizbSRaGAAHDvG8,267
|
312
|
-
accrete/contrib/ui/templates/ui/table.html,sha256=
|
312
|
+
accrete/contrib/ui/templates/ui/table.html,sha256=L7yBeaBX1GMbunUF4-wV3QOdbn6csKiTbDUmmaPaZaA,4044
|
313
313
|
accrete/contrib/ui/templates/ui/table_row_update.html,sha256=_7tKQlCXxczguYQ-6rkZRwukYBswsh3J2cwT4ke_sQM,445
|
314
|
-
accrete/contrib/ui/templates/ui/filter/filter.html,sha256=
|
314
|
+
accrete/contrib/ui/templates/ui/filter/filter.html,sha256=RBYzmgQmgWKjVNrtZo9L98IW23vWLKSDQrZRb88VxrQ,758
|
315
315
|
accrete/contrib/ui/templates/ui/filter/query_input.html,sha256=Qg_41fODXMgL534ohktb0QOxNzAEbaeBzAajJCEK7Pg,2035
|
316
316
|
accrete/contrib/ui/templates/ui/filter/query_operator.html,sha256=h4WWLDnse6DK5Rb_0TTb0wqWxhvY_g3qjwx8_eENMuI,569
|
317
317
|
accrete/contrib/ui/templates/ui/filter/query_params.html,sha256=wCkyZ9oSK_ivraNiL-UAY_9TflYw5EspnHHm6V6uOzk,9548
|
@@ -326,22 +326,21 @@ accrete/contrib/ui/widgets/search_select.py,sha256=RloKdh_t8So6aL4-SmHMAd0-bVY57
|
|
326
326
|
accrete/contrib/user/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
327
327
|
accrete/contrib/user/admin.py,sha256=YS4iApli7XUaIl9GsEJxys2j8sepX0by88omYHjff-E,85
|
328
328
|
accrete/contrib/user/apps.py,sha256=oHDrAiHf-G57mZLyxqGJzRY2DbPprGFD-QgyVJG_ruI,156
|
329
|
-
accrete/contrib/user/forms.py,sha256=
|
329
|
+
accrete/contrib/user/forms.py,sha256=L1HfvG4x6q7ESOk2WicT3r4WyVc3g8FAeQKJyuzZRdc,3118
|
330
330
|
accrete/contrib/user/middleware.py,sha256=qblcujwJsthopagyT-hPFq4HsMyGt-VvqZw5TQopBjk,403
|
331
331
|
accrete/contrib/user/models.py,sha256=PTXzaeep9AS1ykLAo01lcZvtAgabgqgtS2zMd71NUd4,4072
|
332
332
|
accrete/contrib/user/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
|
333
|
-
accrete/contrib/user/urls.py,sha256=
|
334
|
-
accrete/contrib/user/views.py,sha256=
|
333
|
+
accrete/contrib/user/urls.py,sha256=_fBa--3NfyYN10Td7PGHpetJYy42SMqTyCCXhgynkEQ,407
|
334
|
+
accrete/contrib/user/views.py,sha256=2-Jk0_Y5oEmxwisY00B_xfbb5siWzYV1Qgb2y1FGn64,3373
|
335
335
|
accrete/contrib/user/locale/de/LC_MESSAGES/django.mo,sha256=p3rgUg6WltAVIMkQsjvjBqTsd_usLhSr1GH4Cyltc2c,433
|
336
336
|
accrete/contrib/user/locale/de/LC_MESSAGES/django.po,sha256=f_Nxpo3HTm2L3f3zoHLfeWsZ-4IQp_EEVSku6TCZSvw,1870
|
337
337
|
accrete/contrib/user/migrations/0001_initial.py,sha256=JWfM9PcMDfkJUdCjLWuWieGs6643qP0KdbCyr5uAZoY,2950
|
338
338
|
accrete/contrib/user/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
339
339
|
accrete/contrib/user/templates/user/accrete_navbar_end_dropdown.html,sha256=suPoeu1Dm49rDCrhnrkSZY8cBDsovnKqKGXcS5q-7o0,334
|
340
|
-
accrete/contrib/user/templates/user/change_email.html,sha256=
|
341
|
-
accrete/contrib/user/templates/user/change_password.html,sha256=
|
342
|
-
accrete/contrib/user/templates/user/login.html,sha256
|
343
|
-
accrete/contrib/user/templates/user/
|
344
|
-
accrete/contrib/user/templates/user/user_form.html,sha256=4o24KV940D_KsBP4YwBguwTFW9nYz1uz-RILs91M7Po,1935
|
340
|
+
accrete/contrib/user/templates/user/change_email.html,sha256=w9gBnU_O45YchY0EqD9mUK5oeDaD4cN92tHN80QjReA,815
|
341
|
+
accrete/contrib/user/templates/user/change_password.html,sha256=1U7cI-xshsy_nhSj3TUqL3tPtYaBF17XFDgJHXXDzIw,1021
|
342
|
+
accrete/contrib/user/templates/user/login.html,sha256=Qza6fsODk-AhA3U9xAkhqQ5YVmz4SN08ZDDLEJ3Mq6M,3845
|
343
|
+
accrete/contrib/user/templates/user/user_form.html,sha256=nt1EaB1dDMIMFXdmfcSsLJmwhGyoqs7TnY1PQdx1mLQ,2449
|
345
344
|
accrete/contrib/user_registration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
346
345
|
accrete/contrib/user_registration/admin.py,sha256=kwmGTsg4Hii-lsw9-UaJG7AhQ4k4SPi48GSrtpZ4YR4,119
|
347
346
|
accrete/contrib/user_registration/apps.py,sha256=mYu3fuuubfjImeJHk4D_Wd6Edw2r3oUNXGcFbAkhir4,181
|
@@ -364,7 +363,7 @@ accrete/utils/forms.py,sha256=IvxbXNpSd4a-JBgsTJhs2GHe-DCRWX-xnVPRcoiCzbI,3104
|
|
364
363
|
accrete/utils/log.py,sha256=BH0MBDweAjx30wGBO4F3sFhbgkSoEs7T1lLLjlYZNnA,407
|
365
364
|
accrete/utils/models.py,sha256=2xTacvcpmDK_Bp4rAK7JdVLf8HU009LYNJ6eSpMgYZI,1014
|
366
365
|
accrete/utils/views.py,sha256=AutijWetWGgjdO1PNc4gxCblT-i1fAfldNDFRbO9Sac,5012
|
367
|
-
accrete-0.0.
|
368
|
-
accrete-0.0.
|
369
|
-
accrete-0.0.
|
370
|
-
accrete-0.0.
|
366
|
+
accrete-0.0.109.dist-info/METADATA,sha256=QG6I-OyLStvMEQ9JbgO3jKFJ6jLsjs_Nebs7BgL_mYM,4953
|
367
|
+
accrete-0.0.109.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
368
|
+
accrete-0.0.109.dist-info/licenses/LICENSE,sha256=_7laeMIHnsd3Y2vJEXDYXq_PEXxIcjgJsGt8UIKTRWc,1057
|
369
|
+
accrete-0.0.109.dist-info/RECORD,,
|
@@ -1,43 +0,0 @@
|
|
1
|
-
{% extends 'ui/detail.html' %}
|
2
|
-
{% load i18n %}
|
3
|
-
|
4
|
-
{% block detail_content %}
|
5
|
-
<div class="columns">
|
6
|
-
<div class="column is-6">
|
7
|
-
<label class="label is-detail has-field">
|
8
|
-
{% translate 'Username' %}
|
9
|
-
<div class="field">
|
10
|
-
<p class="control is-expanded">{{ object.username|default_if_none:'' }}</p>
|
11
|
-
</div>
|
12
|
-
</label>
|
13
|
-
</div>
|
14
|
-
<div class="column is-6">
|
15
|
-
<label class="label is-detail has-field">
|
16
|
-
{% translate 'E-Mail' %}
|
17
|
-
<div class="field">
|
18
|
-
<p class="control is-expanded">{{ object.email }}</p>
|
19
|
-
</div>
|
20
|
-
</label>
|
21
|
-
</div>
|
22
|
-
</div>
|
23
|
-
<div class="columns">
|
24
|
-
<div class="column is-12">
|
25
|
-
<label class="label is-detail has-field">
|
26
|
-
{% translate 'Name' %}
|
27
|
-
<div class="field">
|
28
|
-
<p class="control is-expanded">{{ object.full_name|default_if_none:'' }}</p>
|
29
|
-
</div>
|
30
|
-
</label>
|
31
|
-
</div>
|
32
|
-
</div>
|
33
|
-
<div class="columns">
|
34
|
-
<div class="column is-6">
|
35
|
-
<label class="label is-detail has-field">
|
36
|
-
{% translate 'Language' %}
|
37
|
-
<div class="field">
|
38
|
-
<p class="control">{{ object.language_code_display }}</p>
|
39
|
-
</div>
|
40
|
-
</label>
|
41
|
-
</div>
|
42
|
-
</div>
|
43
|
-
{% endblock %}
|
File without changes
|
File without changes
|