Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
Pipeline #4564 failed with stage
...@@ -21,23 +21,32 @@ function refresh() { ...@@ -21,23 +21,32 @@ function refresh() {
document.location.reload(true); 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) { function autofill_form(username, fullname, email) {
let username_input = document.getElementById("username"); let username_input = document.getElementById("username");
let fullname_input = document.getElementById("fullname"); let fullname_input = document.getElementById("fullname");
let email_input = document.getElementById("email"); let email_input = document.getElementById("email");
if ((username.localeCompare("None")) !== 0) { if ((username.localeCompare("None")) !== 0) {
username_input.value = username; username_input.value = username;
username_input.disabled = "true"; username_input.disabled = "true";
} }
if ((fullname.localeCompare("None")) !== 0) { if ((fullname.localeCompare("None")) !== 0) {
fullname_input.value = fullname; fullname_input.value = fullname;
fullname_input.disabled = "true"; fullname_input.disabled = "true";
} }
if ((email.localeCompare("None")) !== 0) { if ((email.localeCompare("None")) !== 0) {
email_input.value = email; email_input.value = email;
email_input.disabled = "true"; email_input.disabled = "true";
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment