Commit 8f4ab612 authored by Krish Moodbidri's avatar Krish Moodbidri
Browse files

Merge branch 'master' into test-merger

Conflicts:
	app/__init__.py
parents 0061b650 5f08c96d
function check() {
var submitButton = document.getElementById("submit");
let ckbox = document.getElementById('agree');
submitButton.disabled = !ckbox.checked;
};
function displayloading1() {
$('#overlayModal').modal('show');
}
......@@ -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
})
}
......
......@@ -21,14 +21,13 @@
});
socket.on( 'account ready', function( msg ) {
$('#myModal2').modal('hide');
window.location.replace('{{ referrer }}');
});
socket.on( 'account error', function( msg ) {
console.log(msg);
$('#myModal2').modal('hide');
renderDom("Account Create Error", "{{ error_msg }}", msg);
renderDom("Account Create Error", "{{ error_msg |safe}}", msg);
});
});
......@@ -79,7 +78,7 @@
<div class="col-md-10 col-sm-10 my-col">
<div id="form-wrapper">
<h2> Self Registration Form </h2>
<h2>Welcome to UAB Research Computing</h2>
<p style="font-size:110%;"> {{ welcome_msg |safe }}</p>
<div id="user-input">
<form id="signup" data-toggle="validator" role="form" action="." method="post" onsubmit="">
......@@ -98,8 +97,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>
......@@ -128,7 +128,7 @@
<h4 class="modal-title" id="myModalLabel">Account Request Received!</h4>
</div>
<div class="modal-body">
<span>Please wait while we create your account. This may take up to 5-10 minutes.</span>
<span>Sit tight while we create your account.</span>
<img src="{{ url_for('static', filename='img/loading.gif') }}" width="40px">
</div>
</div>
......
welcome_message = "Welcome to UAB's Reseach Computing cluster. The information below will be used to create your account. Please fill in all the details as this helps us understand our user base. Contact <a href='mailto:support@listserv.uab.edu'>Research Computing</a> for any assistance in creating your account."
cancel_message = "Close browser to end session. Contact <a href="'mailto:support@listserv.uab.edu'">Research Computing</a> for any assistance in creating your account."
error_message = "Error while creating your account. We've been notified about this. Contact <a href="'mailto:support@listserv.uab.edu'">Research Computing</a> for any assistance in creating your account."
welcome_message = "The information below will be used to create your account. Please fill in the reason for requesting your account as this helps us understand our user base.<br>Contact <a href='mailto:support@listserv.uab.edu'>Research Computing</a> if you have any questions."
cancel_message = "Close current tab to end session.<br>Contact <a href="'mailto:support@listserv.uab.edu'">Research Computing</a> if you have any questions."
error_message = "An error occurred while creating your account. Research Computing team has been notified and is working on fixing it.<br>Contact <a href='mailto:support@listserv.uab.edu'>Research Computing</a> if you have any questions."
......@@ -71,12 +71,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)
print(username)
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