Skip to content
Snippets Groups Projects

Flask v0.1

Merged Krish Moodbidri requested to merge krish94/self-reg-form:flask-v0.1 into master
Files
9
@@ -5,11 +5,33 @@ function displayloading() {
@@ -5,11 +5,33 @@ function displayloading() {
function request_account() {
function request_account() {
socket.emit('request account', {
socket.emit('request account', {
fullname: document.getElementById("fullname").value,
fullname: document.getElementById("fullname").value,
 
email: document.getElementById("email").value,
reason: document.getElementById("reason").value,
reason: document.getElementById("reason").value,
username: document.getElementById("bid").value
username: document.getElementById("username").value
})
})
}
}
function refresh() {
function refresh() {
document.location.reload(true);
document.location.reload(true);
}
}
 
 
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";
 
}
 
}
Loading