From 16b3fc1c5e918064daa76d774379fb47ad7a1ed1 Mon Sep 17 00:00:00 2001 From: Krish Moodbidri <krish94@uab.edu> Date: Thu, 18 Nov 2021 13:30:09 -0600 Subject: [PATCH] 1. added aup flag to json object 2. added new function check() to enable/disable submit button based on status of checkbox --- app/static/scripts/function.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/static/scripts/function.js b/app/static/scripts/function.js index d68c816..45f61e8 100644 --- a/app/static/scripts/function.js +++ b/app/static/scripts/function.js @@ -1,6 +1,8 @@ -function check() { +var check_counter =0; +function check() { var submitButton = document.getElementById("submit"); - submitButton.disabled = false; + if ((check_counter+=1)%2) submitButton.disabled = false; + else submitButton.disabled = true; }; function displayloading1() { @@ -17,7 +19,8 @@ function request_account() { fullname: document.getElementById("fullname").value, email: document.getElementById("email").value, reason: document.getElementById("reason").value, - username: document.getElementById("username").value + username: document.getElementById("username").value, + aup: 1 }) } -- GitLab