Skip to content

Commit 64bc3a4

Browse files
committed
Added confirmation popup before canceling appointment
1 parent 7dd05ed commit 64bc3a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

code/mymedic/users/templates/users/dashboard.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ <h3 class="section-title">Your Upcoming Appointments</h3>
108108
<div class="appointment-date">{{ appointment.date|date:"F d, Y" }}</div>
109109
<div class="appointment-detail">Appointment with {{ appointment.doctor_name }}</div>
110110
<div class="appointment-reason">{{ appointment.reason }}</div>
111-
<form method="POST" action="{% url 'cancel_appointment' appointment.id %}">
111+
<form method="POST" action="{% url 'cancel_appointment' appointment.id %}" onsubmit="return confirm('Are you sure you want to cancel this appointment?');">
112112
{% csrf_token %}
113113
<button type="submit" class="btn btn-danger">Cancel</button>
114-
</form>
114+
</form>
115115
</div>
116116
{% endfor %}
117117
</div>

0 commit comments

Comments
 (0)