Newer
Older
function displayloading1() {
$('#myModal1').modal('show');
request_account()
}
function displayloading2() {
$('#myModal1').modal('hide');
$('#myModal2').modal('show');
Mitchell Moore
committed
}
Mitchell Moore
committed
function request_account() {
socket.emit('request account', {
Mitchell Moore
committed
fullname: document.getElementById("fullname").value,
email: document.getElementById("email").value,
Mitchell Moore
committed
reason: document.getElementById("reason").value,
username: document.getElementById("username").value
Mitchell Moore
committed
})
}
Mitchell Moore
committed
Mitchell Moore
committed
function refresh() {
document.location.reload(true);
Mitchell Moore
committed
}
function myFunction(msg) {
document.getElementById("form-wrapper").innerHTML = "<br> <h1> <strong>Error!</strong> A problem occurred while creating your account </h1> <h3> contact <a href = 'mailto: krish94@hotmail.com'>Research Computing team</a> to report this </h3>"
document.getElementById("form-wrapper").innerHTML += msg;
}
function myFunction1() {
var myobj = document.getElementById("demo");
myobj.remove();
document.getElementById('form-wrapper').innerHTML = "<br> <h1> <strong>Account create cancelled</strong> Close the browser tab to end this session </h1> <h3> contact <a href = 'mailto: krish94@hotmail.com'>Research Computing team</a> for any questions</h3>"}
function autofill_form(username, fullname, email) {
let username_input = document.getElementById("username");
let fullname_input = document.getElementById("fullname");
let email_input = document.getElementById("email");
if ((username.localeCompare("None")) !== 0) {
username_input.value = username;
username_input.disabled = "true";
}
if ((fullname.localeCompare("None")) !== 0) {
fullname_input.value = fullname;
fullname_input.disabled = "true";
}
if ((email.localeCompare("None")) !== 0) {
email_input.value = email;
email_input.disabled = "true";
}