Commit 7cf10358 authored by Krish Moodbidri's avatar Krish Moodbidri
Browse files

added linting and removed unused code

parent 86ab9dca
Pipeline #4565 failed with stage
function displayloading1() {
$('#myModal1').modal('show');
request_account()
$('#overlayModal').modal('show');
}
function displayloading2() {
$('#myModal1').modal('hide');
$('#overlayModal').modal('hide');
$('#myModal2').modal('show');
}
......@@ -17,19 +16,12 @@ function request_account() {
})
}
function refresh() {
document.location.reload(true);
function renderDom(title, message, error_msg) {
document.getElementById("form-wrapper").innerHTML = "<h2>" + title + "<br>";
document.getElementById("form-wrapper").innerHTML += "<h3>" + message + "<br>";
document.getElementById("form-wrapper").innerHTML += "<p>" + error_msg;
}
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");
......
......@@ -28,29 +28,23 @@
socket.on( 'account error', function( msg ) {
console.log(msg);
$('#myModal2').modal('hide');
window.location.replace('/register/error_account');
renderDom("Account create error", "contact rc team", msg);
});
});
</script>
<style type="text/css">
.important { color: #336699; }
</style>
<link rel="shortcut icon" type="image/x-icon" href="/public/favicon.ico">
<link rel="shortcut icon" type="image/x-icon" href="/public/favicon.ico">
<link rel="stylesheet" media="all" href="{{ url_for('static', filename='style/application.css') }}">
<link rel="stylesheet" media="all" href="{{ url_for('static', filename='style/app2.css') }}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.navbar-inverse {
background-color: rgb(0,99,65);
}
button{
margin: 13px;
}
.navbar-inverse { background-color: rgb(0,99,65); }
button{ margin: 13px;
.important { color: #336699; }}
</style>
</head>
......@@ -59,107 +53,99 @@ button{
<nav class="navbar navbar-inverse navbar-static-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-9" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
<a class="navbar-brand" href="/"> UAB Research Computing</a>
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-9" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
<a class="navbar-brand" href="/"> UAB Research Computing</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-9">
<ul class="nav navbar-nav">
</ul>
<div class="navbar-right">
<ul class="nav navbar-nav">
<li>
<a target="_blank" href="https://docs.uabgrid.uab.edu/wiki/Cheaha_GettingStarted">
<i class="fas fa-info-circle fa-fw"></i> Online Documentation
</a></li>
<li>
</li></ul>
</div>
<div class="navbar-right">
<ul class="nav navbar-nav">
<li>
<a target="_blank" href="https://docs.uabgrid.uab.edu/wiki/Cheaha_GettingStarted">
<i class="fas fa-info-circle fa-fw"></i> Online Documentation
</a>
</li>
</ul>
</div>
</div>
</div>
</nav>
</header>
<div class="container content" role="main" style="width: 85%">
<div style="position:relative;">
<img alt="logo" height="auto" width="15%" style="margin-bottom: 20px" src="{{ url_for('static', filename='img/logo_svg.svg') }}">
<a href="https://tinyurl.com/cheahaAL" target="_blank">
<div style="float:left;position:absolute;display:block;left:310px;top:-6px;padding:10px 20px;"> </div>
</a>
</div>
<!-- <h2>Hello, <span id="username">{{ user }}</span>!</h2> -->
<h2>Hi, </h2>
<p> Welcome to UAB's Reseach Computing cluster. The information below will be used to create your account. Please fill in all the details as this helps us understand our user base. Contact support@listserv.uab.edu for any assistance in creating your account. </p> <div id="user-input">
<form id="signup" data-toggle="validator" role="form" action="." method="post" onsubmit="">
<div class="col-md-7 col-sm-7 my-col">
<label for="username" class="control-label">Blazer Id:</label>&#9;<input id="username" class="form-control"
placeholder="Enter Username" required><br>
</div>
<div class="col-md-7 col-sm-7 my-col">
<label for="fullname" class="control-label">Full Name:</label>&#9;<input id="fullname" class="form-control"
placeholder="Enter Full Name" required><br>
</div>
<div class="col-md-7 col-sm-7 my-col">
<label for="email" class="control-label">Email:</label>&#9;<input id="email" class="form-control"
placeholder="Enter Email" required><br>
</div>
<div class="col-md-7 col-sm-7 my-col">
<label for="reason" class="control-label">Reason for Requesting Account:</label><br>
<div class="container content" role="main" style="width: 100%">
<div class="col-md-2 col-sm-2 my-col">
<img alt="logo" height="auto" width="80%" src="{{ url_for('static', filename='img/logo_svg.svg') }}">
<a href="https://tinyurl.com/cheahaAL" target="_blank"></a>
</div>
<div class="col-md-10 col-sm-10 my-col">
<div id="form-wrapper">
<h2> Self Registration form </h2>
<p> Welcome to UAB's Reseach Computing cluster. The information below will be used to create your account. <br>Please fill in all the details as this helps us understand our user base. <br>Contact support@listserv.uab.edu for any assistance in creating your account.</p>
<div id="user-input">
<form id="signup" data-toggle="validator" role="form" action="." method="post" onsubmit="">
<div class="col-md-7 col-sm-7 my-col">
<label for="username" class="control-label">Blazer Id:</label>&#9;<input id="username" class="form-control" placeholder="Enter Username" required><br>
</div>
<div class="col-md-7 col-sm-7 my-col">
<label for="fullname" class="control-label">Full Name:</label>&#9;<input id="fullname" class="form-control" placeholder="Enter Full Name" required><br>
</div>
<div class="col-md-7 col-sm-7 my-col">
<label for="email" class="control-label">Email:</label>&#9;<input id="email" class="form-control" placeholder="Enter Email" required><br>
</div>
<div class="col-md-7 col-sm-7 my-col">
<label for="reason" class="control-label">Reason for Requesting Account:</label><br>
<textarea class="form-control" id="reason" name="reason" placeholder="Enter Reason for Account Request" required></textarea>
</div>
<br>
<div class="col-md-7 col-sm-7 my-col">
<button class="btn btn-danger btn-md" id="cancel" name="cancel" type="button" onClick="location.href='https://docs.uabgrid.uab.edu/wiki/cheaha'">Cancel</button>
<button class="btn btn-primary btn-md" id="submit" name="submit" type="button" value="Submit" onclick="displayloading1()"> Create Account</button>
</div>
</form>
</div>
<br>
<div class="col-md-7 col-sm-7 my-col">
<button class="btn btn-danger btn-md" id="cancel" name="cancel" type="button" onClick="renderDom('Account cancel','close browser', '')">Cancel</button>
<button class="btn btn-primary btn-md" id="submit" name="submit" type="button" value="Submit" onclick="displayloading1();request_account()"> Create Account</button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="modal fade" id="overlayModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myModalLabel">Account Request Received!</h4>
</div>
<div class="modal-body">
<span>Communicating this information to the server</span>
<img src="{{ url_for('static', filename='img/loading.gif') }}" width="40px">
</div>
</div>
</div>
</div>
<div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myModalLabel">Account Request Received!</h4>
</div>
<div class="modal-body">
<span>Communicating this information to the server</span>
<img src="{{ url_for('static', filename='img/loading.gif') }}" width="40px">
</div>
</div>
</div>
<div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myModalLabel">Account Request Received!</h4>
</div>
<div class="modal-body">
<span>Please wait while we create your account. This may take up to 5-10 minutes.</span>
<img src="{{ url_for('static', filename='img/loading.gif') }}" width="40px">
</div>
</div>
</div>
</div>
<div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myModalLabel">Account Request Received!</h4>
</div>
<div class="modal-body">
<span>Please wait while we create your account. This may take up to 5-10 minutes.</span>
<img src="{{ url_for('static', filename='img/loading.gif') }}" width="40px">
</div>
</div>
</div>
</div>
<footer>
<div class="container-fluid">
<div class="row">
<div class="col-md-6 col-sm-6">
<a href="https://osc.github.io/Open-OnDemand/">
<img class="footer-logo" alt="Powered by Open OnDemand" height="40" style="margin-bottom: 20px" src="{{ url_for('static', filename='img/OpenOnDemand_powered_by_RGB-cb3aad5ff5350c7994f250fb334ddcc72e343233ce99eb71fda93beddd76a847.svg') }}">
<a href="https://osc.github.io/Open-OnDemand/">
<img class="footer-logo" alt="Powered by Open OnDemand" height="40" style="margin-bottom: 20px" src="{{ url_for('static', filename='img/OpenOnDemand_powered_by_RGB-cb3aad5ff5350c7994f250fb334ddcc72e343233ce99eb71fda93beddd76a847.svg') }}">
</a>
</div>
</div>
</div><!-- /.container -->
</div>
</footer>
</body>
</html>
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