Newer
Older
function displayloading() {

Bo-Chun Chen
committed
$('#myModal').modal('show');
Mitchell Moore
committed
}
Mitchell Moore
committed
function request_account() {
if (document.getElementById("username").checkValidity() &&
document.getElementById("fullname").checkValidity() &&
document.getElementById("email").checkValidity() &&
document.getElementById("reason").checkValidity()){
socket.emit('request account', {
username: document.getElementById("username").value,
fullname: document.getElementById("fullname").value,
email: document.getElementById("email").value,
reason: document.getElementById("reason").value
});
}
Mitchell Moore
committed
}
Mitchell Moore
committed
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";
}
}
Mitchell Moore
committed
function refresh() {
document.location.reload(true);