Skip to content

Commit aa08882

Browse files
committed
Minor fixes
1 parent ea1e78b commit aa08882

File tree

7 files changed

+66
-66
lines changed

7 files changed

+66
-66
lines changed

appointment/static/js/appointments.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ function getAvailableSlots(selectedDate, staffId = null) {
199199
console.log('No staff ID provided, displaying error message.');
200200
const errorMessage = $('<p class="djangoAppt_no-availability-text">'+ noStaffMemberSelectedTxt + '</p>');
201201
errorMessageContainer.append(errorMessage);
202-
// Optionally disable the submit button here
202+
// Optionally disable the "submit" button here
203203
$('.btn-submit-appointment').attr('disabled', 'disabled');
204204
return; // Exit the function early
205205
}

appointment/templates/administration/manage_staff_personal_info.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ <h2>{% trans 'Staff Personal Information' %}</h2>
2929
{{ form.email }}
3030
</div>
3131

32-
<button type="submit" class="btn btn-primary">{% trans 'Update' %}</button>
32+
<button type="submit" class="btn btn-primary">{{ btn_text }}</button>
3333
</form>
3434
<div class="messages" style="margin: 20px 0">
3535
{% if messages %}

appointment/templates/administration/manage_working_hours.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
99
integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA=="
1010
crossorigin="anonymous" referrerpolicy="no-referrer"/>
11-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/css/bootstrap.min.css"
12-
integrity="sha512-b2QcS5SsA8tZodcDtGRELiGv5SaKSk1vDHDaQRda0htPYWZ6046lr3kJ5bAAQdpV2mmA/4v0wQF9MyU6/pDIAg=="
11+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.2/css/bootstrap.min.css"
12+
integrity="sha512-rt/SrQ4UNIaGfDyEXZtNcyWvQeOq0QLygHluFQcSjaGB04IxWhal71tKuzP6K8eYXYB6vJV4pHkXcmFGGQ1/0w=="
1313
crossorigin="anonymous" referrerpolicy="no-referrer"/>
1414
<link rel="stylesheet"
1515
href="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.39.0/css/tempusdominus-bootstrap-4.min.css"
@@ -96,8 +96,8 @@ <h2>{% trans "Manage Working Hours" %}</h2>
9696
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.11.8/umd/popper.min.js"
9797
integrity="sha512-TPh2Oxlg1zp+kz3nFA0C5vVC6leG/6mm1z9+mA81MI5eaUVqasPLO8Cuk4gMF4gUfP5etR73rgU/8PNMsSesoQ=="
9898
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
99-
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/js/bootstrap.min.js"
100-
integrity="sha512-WW8/jxkELe2CAiE4LvQfwm1rajOS8PHasCCx+knHG0gBHt8EXxS6T6tJRTGuDQVnluuAvMxWF4j8SNFDKceLFg=="
99+
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.2/js/bootstrap.min.js"
100+
integrity="sha512-7rusk8kGPFynZWu26OKbTeI+QPoYchtxsmPeBqkHIEXJxeun4yJ4ISYe7C6sz9wdxeE1Gk3VxsIWgCZTc+vX3g=="
101101
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
102102
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.30.1/moment.js"
103103
integrity="sha512-3CuraBvy05nIgcoXjVN33mACRyI89ydVHg7y/HMN9wcTVbHeur0SeBzweSd/rxySapO7Tmfu68+JlKkLTnDFNg=="

appointment/templates/appointment/default_thank_you.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ <h1 class="thank-you-title">{% trans "See you soon" %} !</h1>
2323
<li>{% trans 'Appointment Time' %}: {{ appointment.get_start_time }}</li>
2424
<li>{% trans 'Duration' %}: {{ appointment.get_service_duration }}</li>
2525
</ul>
26+
{% if messages %}
27+
{% for message in messages %}
28+
<div class="alert alert-dismissible {% if message.tags %}alert-{% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}danger{% else %}{{ message.tags }}{% endif %}{% endif %}"
29+
role="alert">{{ message }}</div>
30+
{% endfor %}
31+
{% endif %}
2632
</div>
27-
{% if messages %}
28-
{% for message in messages %}
29-
<div class="alert alert-dismissible {% if message.tags %}alert-{% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}danger{% else %}{{ message.tags }}{% endif %}{% endif %}"
30-
role="alert">{{ message }}</div>
31-
{% endfor %}
32-
{% endif %}
3333
</div>
3434
{% endblock %}
3535
{% block customJS %}

appointment/templates/error_pages/403_forbidden.html

Lines changed: 51 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1+
{% extends BASE_TEMPLATE %}
12
{% load i18n %}
2-
<!DOCTYPE html>
3-
<html lang="en">
4-
<head>
5-
<meta charset="UTF-8">
3+
{% load static %}
4+
{% block site_description %}Designer: Adams Pierre David, Category: Resources forbidden, code 403{% endblock %}
5+
{% block title %}Resources forbidden | 403{% endblock %}
6+
{% block customMetaTag %}
7+
<meta name="robots" content="noindex,nofollow">
8+
{% endblock %}
9+
{% block customCSS %}
610
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
711
integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
8-
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
9-
<meta name="description"
10-
content="Author: Adams Pierre David, Designer: Adams Pierre David, Category: Technology/IT/Blog, Resources forbidden, code 403">
11-
<meta name="google-site-verification" content=""/>
12-
<meta name="robots" content="noindex,nofollow">
13-
<title>Resources forbidden | 403</title>
14-
<link href="/static/root/img/favicon/favicon.ico"
15-
rel="shortcut icon"/>
1612
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
1713
integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA=="
1814
crossorigin="anonymous" referrerpolicy="no-referrer"/>
@@ -83,47 +79,50 @@
8379
}
8480

8581
</style>
86-
</head>
87-
<body>
88-
<br><br><br><br>
89-
<div class="logo">
90-
{% trans "Reality" %}
91-
</div>
92-
<br>
93-
<div class="error">
94-
{% trans "Error 403" %}!
95-
</div>
96-
<br>
97-
<div class="error2">
98-
{% if message %}
99-
{{ message }}
100-
{% else %}
101-
{% trans "You don't have permission to view this resource, and you know it" %}!
102-
{% endif %}
103-
</div>
104-
<br>
105-
<div class="options" align="center">
106-
{% if back_url %}
107-
<button type="button" class="btn btn-primary" id="back" onclick="Back()">
108-
<i class="fa fa-undo"></i> {% trans "Go to profile" %}
109-
</button>
110-
{% else %}
111-
<button type="button" class="btn btn-primary" id="back" onclick="Back()">
112-
<i class="fa fa-undo"></i> {% trans "Go back" %}
113-
</button>
114-
{% endif %}
115-
</div>
116-
<script>
117-
const back_url = "{{ back_url }}";
82+
{% endblock %}
83+
{% block body %}
11884

119-
function Back() {
120-
if (back_url) {
121-
window.location.href = back_url;
122-
} else {
123-
window.history.back();
85+
<body>
86+
<br><br><br><br>
87+
<div class="logo">
88+
{% trans "Reality" %}
89+
</div>
90+
<br>
91+
<div class="error">
92+
{% trans "Error 403" %}!
93+
</div>
94+
<br>
95+
<div class="error2">
96+
{% if message %}
97+
{{ message }}
98+
{% else %}
99+
{% trans "You don't have permission to view this resource, and you know it" %}!
100+
{% endif %}
101+
</div>
102+
<br>
103+
<div class="options" align="center">
104+
{% if back_url %}
105+
<button type="button" class="btn btn-primary" id="back" onclick="Back()">
106+
<i class="fa fa-undo"></i> {% trans "Go to profile" %}
107+
</button>
108+
{% else %}
109+
<button type="button" class="btn btn-primary" id="back" onclick="Back()">
110+
<i class="fa fa-undo"></i> {% trans "Go back" %}
111+
</button>
112+
{% endif %}
113+
</div>
114+
<script>
115+
const back_url = "{{ back_url }}";
116+
117+
function Back() {
118+
if (back_url) {
119+
window.location.href = back_url;
120+
} else {
121+
window.history.back();
122+
}
124123
}
125-
}
126-
</script>
124+
</script>
127125

128126

129-
</body>
127+
</body>
128+
{% endblock %}

appointment/templates/error_pages/404_not_found.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% extends ADMIN_BASE_TEMPLATE %}
1+
{% extends BASE_TEMPLATE %}
22
{% load i18n %}
33
{% load static %}
44
{% block site_description %}Designer: Adams Pierre David, Category: Resources not found, code 404{% endblock %}

appointment/utils/json_context.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ def handle_unauthorized_response(request, message, response_type):
7878
# If not 'json', handle as HTML response by default.
7979
context = {
8080
'message': message,
81-
'back_url': reverse('appointment:user_profile')
81+
'back_url': reverse('appointment:user_profile'),
82+
'BASE_TEMPLATE': APPOINTMENT_BASE_TEMPLATE,
8283
}
8384
# set return code to 403
8485
return render(request, 'error_pages/403_forbidden.html', context=context, status=403)

0 commit comments

Comments
 (0)