From ae0e8c52984dc88cb75b44a120e5308c4740a5eb Mon Sep 17 00:00:00 2001 From: root <root@login001.cm.cluster> Date: Fri, 12 Nov 2021 10:05:32 -0600 Subject: [PATCH] added checkbox to be checked before account creation --- app/static/scripts/function.js | 5 +++++ app/templates/auth/SignUp.html | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/static/scripts/function.js b/app/static/scripts/function.js index ae406d7..d68c816 100644 --- a/app/static/scripts/function.js +++ b/app/static/scripts/function.js @@ -1,3 +1,8 @@ +function check() { + var submitButton = document.getElementById("submit"); + submitButton.disabled = false; +}; + function displayloading1() { $('#overlayModal').modal('show'); } diff --git a/app/templates/auth/SignUp.html b/app/templates/auth/SignUp.html index bf35e19..ed9d64c 100644 --- a/app/templates/auth/SignUp.html +++ b/app/templates/auth/SignUp.html @@ -98,8 +98,9 @@ </div> <br> <div class="col-md-7 col-sm-7 my-col"> + <br><input class="checks" id ="agree" type="checkbox" name="agree" value="agree" onchange= check() />Agree to proceed<br/> <button class="btn btn-danger btn-md" id="cancel" name="cancel" type="button" onClick="renderDom('Account Creation Cancelled','{{ cancel_msg |safe }}', null)">Cancel</button> - <button class="btn btn-primary btn-md" id="submit" name="submit" type="button" value="Submit" onclick="displayloading1();request_account()"> Create Account</button> + <button class="btn btn-primary btn-md" disabled id="submit" name="submit" type="button" value="Submit" onclick="displayloading1();request_account()"> Create Account</button> </div> </form> </div> -- GitLab