Newer
Older
function preCertification() {
const element = document.getElementById("pre-certify");
element.remove();
var x = document.getElementById("user-recertify");
if (x.style.display === "block") {
x.style.display = "none";
} else {
x.style.display = "block";
}
}
var submitButton = document.getElementById("submit");
let ckbox = document.getElementById('agree');
submitButton.disabled = !(ckbox.checked);
$('#overlayModal').modal('show');
$('#overlayModal').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,
// aup: document.getElementById("agree").checked
Mitchell Moore
committed
})
}
Mitchell Moore
committed
function certify_account() {
socket.emit('request certification', {
fullname: document.getElementById("fullname").value,
email: document.getElementById("email").value,
username: document.getElementById("username").value
})
}
function renderDom(title, message, error_msg) {
document.getElementById("form-wrapper").innerHTML = "<h3>" + title + "</h3><br>";
document.getElementById("form-wrapper").innerHTML += "<p>" + message + "</p><br>";
var error_button = document.createElement("BUTTON");
error_button.innerHTML = 'Read Error Message';
document.getElementById("form-wrapper").appendChild(error_button);
error_button.onclick = function(){document.getElementById("form-wrapper").innerHTML += "<br>" +error_msg}
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";
}