Commit 5f08c96d authored by Ravi Tripathi's avatar Ravi Tripathi
Browse files

Merge branch 'feat-checkbox' into 'master'

feat aup field for account creation

See merge request rc/self-reg-form!14
parents 5c06809c 389cfaef
Pipeline #5889 failed with stage
function check() {
var submitButton = document.getElementById("submit");
let ckbox = document.getElementById('agree');
submitButton.disabled = !ckbox.checked;
function displayloading1() {
......@@ -12,7 +18,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: document.getElementById("agree").checked
......@@ -97,8 +97,9 @@
<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>
......@@ -51,12 +51,13 @@ def celery_create_account(json, session):
email= json['email']
fullname= json['fullname']
reason= json['reason']
aup= json['aup']
queuename= rc_util.encode_name(username)
print(time.strftime("%m-%d-%Y_%H:%M:%S") + '\tUser ' + username + ' added to queue')
send_msg('creating account', room)
rc_util.add_account(username, queuename, email, fullname, reason)
rc_util.add_account(username, queuename, email, fullname, reason, aup)
print('sent account info')
print('Waiting for completion...')
rc_util.consume(queuename, routing_key=f'complete.{queuename}', callback=gen_f(room))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment