micro-users 1.6.3__py3-none-any.whl → 1.7.0__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.
Potentially problematic release.
This version of micro-users might be problematic. Click here for more details.
- {micro_users-1.6.3.dist-info → micro_users-1.7.0.dist-info}/METADATA +2 -1
- {micro_users-1.6.3.dist-info → micro_users-1.7.0.dist-info}/RECORD +15 -13
- users/filters.py +54 -19
- users/static/users/css/detail.css +47 -0
- users/static/users/css/login.css +111 -68
- users/static/users/css/profile.css +123 -0
- users/static/users/css/style.css +27 -145
- users/templates/registration/login.html +19 -34
- users/templates/users/profile/profile.html +97 -46
- users/templates/users/profile/profile_edit.html +81 -58
- users/templates/users/user_activity_log.html +2 -2
- users/templates/users/user_detail.html +95 -39
- {micro_users-1.6.3.dist-info → micro_users-1.7.0.dist-info}/LICENSE +0 -0
- {micro_users-1.6.3.dist-info → micro_users-1.7.0.dist-info}/WHEEL +0 -0
- {micro_users-1.6.3.dist-info → micro_users-1.7.0.dist-info}/top_level.txt +0 -0
users/static/users/css/style.css
CHANGED
|
@@ -1,136 +1,43 @@
|
|
|
1
1
|
/* Custom styles for Micro Users App */
|
|
2
2
|
|
|
3
|
-
/* Buttons and Colors Usage */
|
|
4
|
-
.btn-primary {
|
|
5
|
-
background-color: var(--primal) !important;
|
|
6
|
-
border-color: var(--primal) !important;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.btn-primary:hover {
|
|
10
|
-
background-color: var(--primal_dark) !important;
|
|
11
|
-
border-color: var(--primal_dark) !important;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.btn-outline-primary {
|
|
15
|
-
border-color: var(--primal_dark) !important;
|
|
16
|
-
color: var(--primal_dark) !important;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.btn-outline-primary:hover {
|
|
20
|
-
background-color: var(--primal_dark) !important;
|
|
21
|
-
color: white !important;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.text-bg-primary {
|
|
25
|
-
background-color: var(--primal) !important;
|
|
26
|
-
border-color: var(--primal) !important;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.list-group-item.active{
|
|
30
|
-
background-color: var(--htitle) !important;
|
|
31
|
-
border-color: var(--title) !important;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.granour { color: var(--granour) !important; }
|
|
35
|
-
.primal { color: var(--primal) !important; }
|
|
36
|
-
.primal:hover { color: var(--primal_dark) !important; }
|
|
37
|
-
|
|
38
|
-
/* Pagination */
|
|
39
|
-
.pagination {
|
|
40
|
-
--bs-pagination-active-bg: var(--primal) !important;
|
|
41
|
-
--bs-pagination-active-border-color: var(--primal) !important;
|
|
42
|
-
--bs-pagination-color: var(--primal) !important;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.pagination .next .page-link::before {
|
|
46
|
-
content: ">>";
|
|
47
|
-
font-size: 16px;
|
|
48
|
-
}
|
|
49
|
-
.pagination .previous .page-link::before {
|
|
50
|
-
content: "<<";
|
|
51
|
-
font-size: 16px;
|
|
52
|
-
}
|
|
53
|
-
.pagination .next .page-link,
|
|
54
|
-
.pagination .previous .page-link {
|
|
55
|
-
font-size: 0;
|
|
56
|
-
}
|
|
57
|
-
.pagination .next .page-link span,
|
|
58
|
-
.pagination .previous .page-link span {
|
|
59
|
-
font-size: 16px;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/* Inputs */
|
|
63
|
-
input[dir="rtl"], input[type="number"], input[type="email"] {
|
|
64
|
-
text-align: right;
|
|
65
|
-
direction: rtl;
|
|
66
|
-
unicode-bidi: plaintext;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
input[dir="rtl"]::placeholder {
|
|
70
|
-
text-align: right;
|
|
71
|
-
color: #484848;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
form label {
|
|
75
|
-
font-weight: 600;
|
|
76
|
-
font-size: 1.2rem;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* Cards */
|
|
80
|
-
.card { --bs-card-border-radius: 0px !important; }
|
|
81
3
|
.icard { transition: all 0.3s ease-in-out; }
|
|
82
4
|
.icard:hover { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.1) !important; }
|
|
83
5
|
|
|
84
|
-
/*
|
|
85
|
-
.table>tbody>tr
|
|
86
|
-
.table>tbody>tr
|
|
87
|
-
--bs-table-bg-type:
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.table>tbody>tr:nth-child(even)>td,
|
|
91
|
-
.table>tbody>tr:nth-child(even)>th {
|
|
92
|
-
--bs-table-bg-type: whitesmoke;
|
|
6
|
+
/* Table Danger Fixes */
|
|
7
|
+
.table > tbody > tr.table-danger > td,
|
|
8
|
+
.table > tbody > tr.table-danger > th {
|
|
9
|
+
--bs-table-bg-type: #f8d7da !important;
|
|
93
10
|
}
|
|
94
|
-
|
|
95
|
-
.table
|
|
96
|
-
|
|
97
|
-
font-size: 20px;
|
|
98
|
-
transition: font-size 0.3s;
|
|
11
|
+
.table-hover > tbody > tr.table-danger:hover > td,
|
|
12
|
+
.table-hover > tbody > tr.table-danger:hover > th {
|
|
13
|
+
--bs-table-bg-type: #f1b0b7 !important;
|
|
99
14
|
}
|
|
100
15
|
|
|
101
|
-
.table
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
16
|
+
.missing-numbers-table {
|
|
17
|
+
width: 100%;
|
|
18
|
+
table-layout: fixed;
|
|
19
|
+
word-wrap: break-word;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-wrap: wrap;
|
|
105
22
|
}
|
|
106
23
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
24
|
+
.missing-numbers-table tr {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-wrap: wrap;
|
|
27
|
+
width: 100%;
|
|
111
28
|
}
|
|
112
29
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
30
|
+
.missing-numbers-table td {
|
|
31
|
+
padding: 5px 5px 15px 5px;
|
|
32
|
+
text-align: center;
|
|
33
|
+
min-width: 80px; /* Adjust to fit your needs */
|
|
34
|
+
border-style: solid !important;
|
|
116
35
|
}
|
|
117
|
-
th a::after {
|
|
118
|
-
font-family: "bootstrap-icons";
|
|
119
|
-
content: "\F238";
|
|
120
|
-
font-size: 14px;
|
|
121
|
-
margin-right: 3px;
|
|
122
|
-
}
|
|
123
|
-
th.asc a::after { content: "\F235"; }
|
|
124
|
-
th.desc a::after { content: "\F229"; }
|
|
125
36
|
|
|
126
|
-
|
|
127
|
-
.table
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
.table-hover > tbody > tr.table-danger:hover > td,
|
|
132
|
-
.table-hover > tbody > tr.table-danger:hover > th {
|
|
133
|
-
--bs-table-bg-type: #f1b0b7 !important;
|
|
37
|
+
@media print {
|
|
38
|
+
.missing-numbers-table td {
|
|
39
|
+
padding: 1px 1px 0px 1px;
|
|
40
|
+
}
|
|
134
41
|
}
|
|
135
42
|
|
|
136
43
|
/* Utils */
|
|
@@ -147,34 +54,9 @@ th.desc a::after { content: "\F229"; }
|
|
|
147
54
|
border-radius: 5px;
|
|
148
55
|
}
|
|
149
56
|
|
|
150
|
-
.button-group{ padding: 10px; }
|
|
151
|
-
.checkbox-inline { display:inline-flex; margin-left: 5px; margin-right: 10px; }
|
|
152
|
-
#id_year { direction: rtl; }
|
|
153
|
-
.option-separator { border-bottom: 1px solid #ddd; padding-bottom: 5px; }
|
|
154
|
-
.option-separator:last-of-type { border-bottom: none; }
|
|
155
|
-
.alert { opacity: 1; transition: opacity 0.5s ease-in-out; }
|
|
156
|
-
|
|
157
|
-
@media print {
|
|
158
|
-
.no-print { display: none !important; }
|
|
159
|
-
.new-page { page-break-inside: avoid; }
|
|
160
|
-
*, .shadow {
|
|
161
|
-
box-shadow: none !important;
|
|
162
|
-
text-shadow: none !important;
|
|
163
|
-
border-color: rgba(0, 0, 0, var(--bs-border-opacity)) !important;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/* Main Content Utils */
|
|
168
|
-
.disabler { pointer-events: none !important; cursor: not-allowed !important; }
|
|
169
|
-
.base-link { color: var(--title) !important; }
|
|
170
|
-
.is-placeholder { background-color: rgba(255, 0, 0, 0.1); font-weight: bold; }
|
|
171
|
-
.card_text_big { font-size: 24px; }
|
|
172
|
-
.bi-font { font-size: 16px; }
|
|
173
|
-
|
|
174
|
-
|
|
175
57
|
/* Strikethrough for deleted rows */
|
|
176
58
|
tr.row-deleted {
|
|
177
|
-
color: #aeaeae !important;
|
|
59
|
+
color: #aeaeae !important;
|
|
178
60
|
}
|
|
179
61
|
|
|
180
62
|
/* Override bootstrap table striping for deleted rows */
|
|
@@ -26,47 +26,32 @@
|
|
|
26
26
|
{% endif %}
|
|
27
27
|
|
|
28
28
|
<div class="page">
|
|
29
|
-
<div class="container
|
|
30
|
-
<div class="right p-3 align-content-center">
|
|
31
|
-
<div class="">
|
|
32
|
-
<img src="{% static 'img/login_logo.webp' %}" alt="Login Logo" class="img-fluid mx-auto d-block logo-img">
|
|
33
|
-
</div>
|
|
34
|
-
{% comment %} <div class="login mb-3 text-secondary">تسجيل الدخــول</div> {% endcomment %}
|
|
35
|
-
</div>
|
|
29
|
+
<div class="container">
|
|
36
30
|
<div class="left">
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
id="linearGradient"
|
|
42
|
-
x1="13"
|
|
43
|
-
y1="193.49992"
|
|
44
|
-
x2="307"
|
|
45
|
-
y2="193.49992"
|
|
46
|
-
gradientUnits="userSpaceOnUse">
|
|
47
|
-
<stop
|
|
48
|
-
style="stop-color:var(--gradient-end);"
|
|
49
|
-
offset="0"
|
|
50
|
-
id="stop876" />
|
|
51
|
-
<stop
|
|
52
|
-
style="stop-color:var(--gradient-start);"
|
|
53
|
-
offset="1"
|
|
54
|
-
id="stop878" />
|
|
55
|
-
</linearGradient>
|
|
56
|
-
</defs>
|
|
57
|
-
<path d="m 40,120.00016 239.99984,-3.2e-4 c 0,0 24.99263,0.79932 25.00016,35.00016 0.008,34.20084 -25.00016,35 -25.00016,35 h -239.99984 c 0,-0.0205 -25,4.01348 -25,38.5 0,34.48652 25,38.5 25,38.5 h 215 c 0,0 20,-0.99604 20,-25 0,-24.00396 -20,-25 -20,-25 h -190 c 0,0 -20,1.71033 -20,25 0,24.00396 20,25 20,25 h 168.57143" />
|
|
58
|
-
</svg>
|
|
59
|
-
<form action="{% url 'login' %}" method="POST">
|
|
31
|
+
<div class="text-center mb-4 d-md-none">
|
|
32
|
+
<img src="{% static 'img/login_logo.webp' %}" alt="Login Logo" class="logo-img">
|
|
33
|
+
</div>
|
|
34
|
+
<form action="{% url 'login' %}" method="POST" class="w-100">
|
|
60
35
|
{% csrf_token %}
|
|
61
|
-
<div class="form">
|
|
62
|
-
<
|
|
36
|
+
<div class="form m-0 mx-auto">
|
|
37
|
+
<div class="mb-4">
|
|
38
|
+
<label for="username">اسم المستخدم</label>
|
|
39
|
+
<input type="text" class="login-input" id="username" name="username" autofocus required>
|
|
40
|
+
</div>
|
|
63
41
|
|
|
64
|
-
<
|
|
42
|
+
<div class="mb-4">
|
|
43
|
+
<label for="password">كلمة المرور</label>
|
|
44
|
+
<input type="password" class="login-input" id="password" name="password" required>
|
|
45
|
+
</div>
|
|
65
46
|
|
|
66
|
-
<
|
|
47
|
+
<button type="submit" class="w-100 btn btn-lg mt-3" id="submit">دخول</button>
|
|
67
48
|
</div>
|
|
68
49
|
</form>
|
|
69
50
|
</div>
|
|
51
|
+
|
|
52
|
+
<div class="right d-none d-md-flex">
|
|
53
|
+
<img src="{% static 'img/login_logo.webp' %}" alt="Login Logo" class="logo-img">
|
|
54
|
+
</div>
|
|
70
55
|
</div>
|
|
71
56
|
</div>
|
|
72
57
|
|
|
@@ -6,58 +6,109 @@
|
|
|
6
6
|
{% block title %}الملف الشخصي{% endblock %}
|
|
7
7
|
|
|
8
8
|
{% block content %}
|
|
9
|
+
<link rel="stylesheet" href="{% static 'users/css/profile.css' %}">
|
|
9
10
|
|
|
10
|
-
<div class="card">
|
|
11
|
-
<div class="card-header display-5">
|
|
12
|
-
<h1><strong>الــملف الشخصــي</strong></h1>
|
|
13
|
-
</div>
|
|
14
|
-
<div class="card-body row">
|
|
15
|
-
<div class="mt-4 col-md-9 h2">
|
|
16
|
-
<p><strong>اسم الـمستخدم:</strong> {{ user.username }}</p>
|
|
17
|
-
<p><strong>البريد الالكتروني:</strong> {{ user.email }}</p>
|
|
18
|
-
<p><strong>الاســــــــــــــــــم:</strong> {{ user.full_name }}</p>
|
|
19
|
-
<p><strong>رقـــــم الـــهاتف:</strong> {{ user.phone }}</p>
|
|
20
|
-
<p><strong>جهـــــة الـــعمل:</strong> {{ user.occupation }}</p>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="col-md-3 mt-4 d-block mx-auto">
|
|
23
|
-
<img src="{% static 'img/default_profile.webp' %}" alt="Profile Image" class="img-thumbnail" width="250">
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
<div class="row mt-4">
|
|
28
|
-
<form method="post">
|
|
29
|
-
{% csrf_token %}
|
|
30
|
-
<a class="btn btn-secondary" href="{% url 'edit_profile' %}" role="button" title="تحديث البيانات">
|
|
31
|
-
<i class="bi bi-pencil-square text-light me-1 h4"></i> تحديث البيانات
|
|
32
|
-
</a>
|
|
33
|
-
|
|
34
|
-
<a class="btn btn-danger" href="#" role="button" data-bs-toggle="modal" data-bs-target="#resetPasswordModal" title="تغيير كلمة المرور">
|
|
35
|
-
<i class="bi bi-lock text-light me-1 h4"></i> تغيير كلمة المرور
|
|
36
|
-
</a>
|
|
37
|
-
|
|
38
|
-
<a href="{% url 'index' %}" class="btn btn-dark" title="الرئيسية">
|
|
39
|
-
<i class="bi bi-house-door text-light me-1 h4"></i> الرئيسية
|
|
40
|
-
</a>
|
|
41
|
-
</form>
|
|
42
|
-
</div>
|
|
43
11
|
|
|
44
|
-
|
|
45
|
-
<div class="
|
|
46
|
-
<div class="
|
|
47
|
-
<
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
12
|
+
<div class="row justify-content-center mt-4">
|
|
13
|
+
<div class="col-lg-10">
|
|
14
|
+
<div class="glass-profile">
|
|
15
|
+
<h1 class="page-title text-center display-6">
|
|
16
|
+
<i class="bi bi-person-circle me-2"></i> الملف الشخصي
|
|
17
|
+
</h1>
|
|
18
|
+
|
|
19
|
+
<div class="row align-items-start">
|
|
20
|
+
<!-- Profile Image Section -->
|
|
21
|
+
<div class="col-md-4 text-center mb-4 mb-md-0 border-start ps-md-4">
|
|
22
|
+
<div class="profile-img-container mb-3">
|
|
23
|
+
<img src="{% static 'img/default_profile.webp' %}" alt="Profile Image">
|
|
24
|
+
</div>
|
|
25
|
+
<h3 class="fw-bold text-primary mb-1">{{ user.full_name }}</h3>
|
|
51
26
|
</div>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<
|
|
57
|
-
|
|
27
|
+
|
|
28
|
+
<!-- Info Section -->
|
|
29
|
+
<div class="col-md-8 pe-md-4">
|
|
30
|
+
<div class="row">
|
|
31
|
+
<div class="col-md-6">
|
|
32
|
+
<div class="mb-3">
|
|
33
|
+
<div class="info-label">اسم المستخدم</div>
|
|
34
|
+
<div class="info-value">{{ user.username }}</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="col-md-6">
|
|
38
|
+
<div class="mb-3">
|
|
39
|
+
<div class="info-label">البريد الإلكتروني</div>
|
|
40
|
+
<div class="info-value">{{ user.email }}</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="col-md-6">
|
|
44
|
+
<div class="mb-3">
|
|
45
|
+
<div class="info-label">الصلاحيات</div>
|
|
46
|
+
<div class="info-value">
|
|
47
|
+
{% if user.is_superuser %}
|
|
48
|
+
مدير النظام
|
|
49
|
+
{% elif user.is_staff %}
|
|
50
|
+
مستخدم مسؤول
|
|
51
|
+
{% else %}
|
|
52
|
+
مستخدم عادي
|
|
53
|
+
{% endif %}
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="col-md-6">
|
|
58
|
+
<div class="mb-3">
|
|
59
|
+
<div class="info-label">رقم الهاتف</div>
|
|
60
|
+
<div class="info-value">{{ user.phone|default:"-" }}</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<!-- Actions -->
|
|
66
|
+
<div class="row mt-4 pt-3 border-top border-light">
|
|
67
|
+
<div class="col-12 d-flex flex-wrap gap-3 justify-content-end">
|
|
68
|
+
<a class="btn btn-primary action-btn" href="{% url 'edit_profile' %}">
|
|
69
|
+
<i class="bi bi-pencil-square h5 m-0"></i>
|
|
70
|
+
<span>تحديث البيانات</span>
|
|
71
|
+
</a>
|
|
72
|
+
|
|
73
|
+
<button type="button" class="btn btn-outline-danger action-btn" data-bs-toggle="modal" data-bs-target="#resetPasswordModal">
|
|
74
|
+
<i class="bi bi-shield-lock h5 m-0"></i>
|
|
75
|
+
<span>تغيير كلمة المـرور</span>
|
|
76
|
+
</button>
|
|
77
|
+
|
|
78
|
+
<a href="{% url 'index' %}" class="btn btn-dark action">
|
|
79
|
+
<i class="bi bi-house-door h5 m-0"></i>
|
|
80
|
+
<span>الرئيسية</span>
|
|
81
|
+
</a>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
58
84
|
</div>
|
|
59
85
|
</div>
|
|
60
86
|
</div>
|
|
61
87
|
</div>
|
|
88
|
+
</div>
|
|
62
89
|
|
|
90
|
+
<!-- Change Password Modal -->
|
|
91
|
+
<div class="modal fade" id="resetPasswordModal" tabindex="-1" aria-labelledby="resetPasswordModalLabel" aria-hidden="true">
|
|
92
|
+
<div class="modal-dialog modal-dialog-centered">
|
|
93
|
+
<div class="modal-content border-0 shadow-lg" style="border-radius: 16px; overflow: hidden;">
|
|
94
|
+
<div class="modal-header bg-light border-0">
|
|
95
|
+
<h5 class="modal-title fw-bold text-primary" id="resetPasswordModalLabel">
|
|
96
|
+
<i class="bi bi-key me-2"></i> تغيير كلمة المرور
|
|
97
|
+
</h5>
|
|
98
|
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
99
|
+
</div>
|
|
100
|
+
<div class="modal-body p-4">
|
|
101
|
+
<form method="post">
|
|
102
|
+
{% csrf_token %}
|
|
103
|
+
{{ password_form|crispy }}
|
|
104
|
+
<div class="d-grid mt-4">
|
|
105
|
+
<button type="submit" name="change_password" class="btn btn-success action-btn justify-content-center">
|
|
106
|
+
تأكيد التغيير
|
|
107
|
+
</button>
|
|
108
|
+
</div>
|
|
109
|
+
</form>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
63
114
|
{% endblock %}
|
|
@@ -6,72 +6,95 @@
|
|
|
6
6
|
{% block title %}تحديث الملف الشخصي{% endblock %}
|
|
7
7
|
|
|
8
8
|
{% block content %}
|
|
9
|
+
<link rel="stylesheet" href="{% static 'users/css/profile.css' %}">
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<div class="
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
11
|
+
|
|
12
|
+
<div class="row justify-content-center mt-4">
|
|
13
|
+
<div class="col-lg-10">
|
|
14
|
+
<form method="POST" enctype="multipart/form-data">
|
|
15
|
+
{% csrf_token %}
|
|
16
|
+
<div class="glass-card">
|
|
17
|
+
<h1 class="page-title text-center display-6">
|
|
18
|
+
<i class="bi bi-pencil-square me-2"></i> تحديث الملف الشخصي
|
|
19
|
+
</h1>
|
|
20
|
+
|
|
21
|
+
<div class="row g-5">
|
|
22
|
+
<!-- Form Fields -->
|
|
23
|
+
<div class="col-md-8 order-2 order-md-1">
|
|
24
|
+
<div class="row g-3">
|
|
25
|
+
<div class="col-12">
|
|
26
|
+
<label for="username" class="form-label-custom">اسم المستخدم</label>
|
|
27
|
+
<input type="text" name="username" id="username" class="form-control form-control-glass" value="{{ user.username }}">
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div class="col-12">
|
|
31
|
+
<label for="email" class="form-label-custom">البريد الإلكتروني</label>
|
|
32
|
+
<input type="email" name="email" id="email" class="form-control form-control-glass" value="{{ user.email }}">
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div class="col-md-6">
|
|
36
|
+
<label for="first_name" class="form-label-custom">الاسم الأول</label>
|
|
37
|
+
<input type="text" name="first_name" id="first_name" class="form-control form-control-glass" value="{{ user.first_name }}">
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div class="col-md-6">
|
|
41
|
+
<label for="last_name" class="form-label-custom">الاسم الأخير (اللقب)</label>
|
|
42
|
+
<input type="text" name="last_name" id="last_name" class="form-control form-control-glass" value="{{ user.last_name }}">
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div class="col-md-6">
|
|
46
|
+
<label for="phone" class="form-label-custom">رقم الهاتف</label>
|
|
47
|
+
<input type="text" name="phone" id="phone" class="form-control form-control-glass" value="{{ user.phone }}">
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div class="mt-5 d-flex gap-3 flex-wrap">
|
|
52
|
+
<button type="submit" class="btn btn-success action-btn shadow-sm" title="حفظ التغييرات">
|
|
53
|
+
<i class="bi bi-check2-circle h4 m-0"></i> حفظ التغييرات
|
|
54
|
+
</button>
|
|
55
|
+
|
|
56
|
+
<a href="{% url 'user_profile' %}" class="btn btn-secondary action-btn shadow-sm" title="إلغاء">
|
|
57
|
+
<i class="bi bi-x-circle h4 m-0"></i> إلغـــاء
|
|
58
|
+
</a>
|
|
59
|
+
</div>
|
|
35
60
|
</div>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
61
|
+
|
|
62
|
+
<!-- Image Preview -->
|
|
63
|
+
<div class="col-md-4 order-1 order-md-2">
|
|
64
|
+
<div class="profile-preview-container">
|
|
65
|
+
<img id="profile_image_preview"
|
|
66
|
+
src="{% static 'img/default_profile.webp' %}"
|
|
67
|
+
alt="Profile Preview"
|
|
68
|
+
class="img-fluid preview-img mb-3"
|
|
69
|
+
width="220" height="220">
|
|
70
|
+
<div class="text-muted small">صورة الملف الشخصي</div>
|
|
71
|
+
</div>
|
|
39
72
|
</div>
|
|
40
73
|
</div>
|
|
41
|
-
<div class="col-md-3 mt-4 d-block mx-auto">
|
|
42
|
-
<img id="profile_image_preview"
|
|
43
|
-
src="{% static 'img/default_profile.webp' %}"
|
|
44
|
-
alt="Profile Image" class="img-thumbnail" width="250">
|
|
45
|
-
</div>
|
|
46
74
|
</div>
|
|
47
|
-
</
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<i class="bi bi-check2-square text-light me-1 h4"></i> حفظ التغييرات
|
|
51
|
-
</button>
|
|
52
|
-
<a href="{% url 'user_profile' %}" class="btn btn-secondary" title="إلغـــاء">
|
|
53
|
-
<i class="bi bi-x-circle text-light me-1 h4"></i> إلغـــاء
|
|
54
|
-
</a>
|
|
55
|
-
</div>
|
|
56
|
-
</form>
|
|
75
|
+
</form>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
57
78
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
79
|
+
<!-- Change Password Modal -->
|
|
80
|
+
<div class="modal fade" id="resetPasswordModal" tabindex="-1" aria-labelledby="resetPasswordModalLabel" aria-hidden="true">
|
|
81
|
+
<div class="modal-dialog modal-dialog-centered">
|
|
82
|
+
<div class="modal-content border-0 shadow-lg" style="border-radius: 16px; overflow: hidden;">
|
|
83
|
+
<div class="modal-header bg-light border-0">
|
|
84
|
+
<h5 class="modal-title fw-bold text-primary" id="resetPasswordModalLabel">تغيير كلمة المرور</h5>
|
|
85
|
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
86
|
+
</div>
|
|
87
|
+
<div class="modal-body p-4">
|
|
88
|
+
<form method="post">
|
|
89
|
+
{% csrf_token %}
|
|
90
|
+
{{ password_form.as_p }}
|
|
91
|
+
<div class="d-grid mt-3">
|
|
92
|
+
<button type="submit" name="change_password" class="btn btn-success action-btn justify-content-center">تغيير كلمة المرور</button>
|
|
93
|
+
</div>
|
|
94
|
+
</form>
|
|
73
95
|
</div>
|
|
74
96
|
</div>
|
|
75
97
|
</div>
|
|
98
|
+
</div>
|
|
76
99
|
|
|
77
100
|
{% endblock %}
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
{% crispy filter.form %}
|
|
13
13
|
</form>
|
|
14
14
|
|
|
15
|
-
<div class="card border-
|
|
16
|
-
<div class="card-body p-0 table-responsive
|
|
15
|
+
<div class="card border-0 shadow-sm rounded-4">
|
|
16
|
+
<div class="card-body p-0 table-responsive">
|
|
17
17
|
<!-- Render the table -->
|
|
18
18
|
{% render_table table %}
|
|
19
19
|
</div>
|