From 41d1fa605b4fb0293a21b516024f3d9d42897a45 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 13 Oct 2025 10:05:43 +0100 Subject: [PATCH] Fix button formatting and ensure proper user checks in collection reset answers template --- .../atlas/collection_reset_answers_user_list.html | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/atlas/templates/atlas/collection_reset_answers_user_list.html b/atlas/templates/atlas/collection_reset_answers_user_list.html index f2be051d..ecd48659 100644 --- a/atlas/templates/atlas/collection_reset_answers_user_list.html +++ b/atlas/templates/atlas/collection_reset_answers_user_list.html @@ -1,10 +1,14 @@ {% for cid_user_exam in cid_users %} + {% if cid_user_exam.user_user and cid_user_exam.user_user.id %} - + hx-post="{% url 'atlas:collection_reset_answers_user' collection.pk cid_user_exam.user_user.id %}" + hx-swap="outerHTML" + hx-confirm="Are you sure you want to reset answers for the user? This action cannot be undone." + >{{ cid_user_exam.user_user }} + {% else %} + + {% endif %} + {% endfor %} \ No newline at end of file