Commit 86ab9dca authored by Krish Moodbidri's avatar Krish Moodbidri
Browse files

added linting and added code to re-render the web-page

parent 37d60363
......@@ -21,23 +21,32 @@ function refresh() {
document.location.reload(true);
}
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";
}
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";
}
}
Markdown is supported
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