From 8aeb0dfa205a58519ac87f8a6b0dab0f77c548ea Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 29 Jul 2021 21:57:26 +0100 Subject: [PATCH] . --- sbas/templates/sbas/exam_start.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sbas/templates/sbas/exam_start.html b/sbas/templates/sbas/exam_start.html index b6f5b803..e845e025 100755 --- a/sbas/templates/sbas/exam_start.html +++ b/sbas/templates/sbas/exam_start.html @@ -4,6 +4,7 @@

{{exam.name}}

+Enter your CID in the below box. @@ -12,7 +13,12 @@ $(document).ready(function () { $("button").click(() => { let cid = $("#cid-box").val(); + + if (Number.isInteger(cid)) { window.location.replace("{% url 'sbas:exam_take' pk=exam.pk sk=0 cid='0000000' %}".replace("0000000", cid)); + } else { + alert("Please enter a valid Candidate ID (CID).") + } }); });