diff --git a/vendor/regidesk/regidesk/templates/regidesk/ci_landing.html b/vendor/regidesk/regidesk/templates/regidesk/ci_landing.html index 01a7245a..de9479c5 100644 --- a/vendor/regidesk/regidesk/templates/regidesk/ci_landing.html +++ b/vendor/regidesk/regidesk/templates/regidesk/ci_landing.html @@ -13,7 +13,8 @@ <div class="my-5 col-12"> <h2>Check-in</h2> <p>Please scan QR Code or enter it below</p> - <video id="preview"" autoplay style="width: 500px; height: 500px; border: 1px solid green;"></video> + <p><strong id="note"></strong></p> + <video id="preview"" autoplay style="width: 500px; height: 500px; border: 1px solid green;"></video> </div> <div class="my-5 col-12"> @@ -37,9 +38,12 @@ // considering we have quite a few domains right now. // We simply validate that the domain ends in an OK format, which isn't ideal but should give us // enough reassurance for the time being. 2020 Can fix this :P - var checkin_re = new RegExp('\/checkin\/[A-Z0-9]{6}\.png$'); + var checkin_re = new RegExp('[A-Z0-9]{6}'); if (checkin_re.test(content)) { - window.location.href = content; + document.getElementById('note').textContent = "Code " + content + " found. Redirecting ..."; + window.location.href = window.location.href + content; + } else { + document.getElementById('note').textContent = "INVALID code " + content + " found"; } });