Skip to content
Snippets Groups Projects
Commit 2ceaf733 authored by root's avatar root
Browse files

fixed overlay turn on on click submit

parent 033548da
Branches feat-overlay-fix
No related tags found
No related merge requests found
Pipeline #4123 failed with stage
function displayloading() {
$('#myModal').modal('show');
function displayloading1() {
$('#myModal1').modal('show');
request_account()
}
function displayloading2() {
$('#myModal1').modal('hide');
$('#myModal2').modal('show');
}
function request_account() {
......
......@@ -18,7 +18,7 @@
socket.on( 'creating account', function( msg ) {
document.getElementById("error").innerText = "";
displayloading();
displayloading2();
});
socket.on( 'account ready', function( msg ) {
......@@ -26,6 +26,11 @@
window.location.replace('{{ referrer }}');
});
socket.on( 'account error', function( msg ) {
$('#myModal').modal('hide');
window.location.replace("www.google.com")
});
socket.on( 'Account creation failed', function( msg ) {
document.getElementById("error").innerText = "Registration Failed. Please try again.";
});
......@@ -107,7 +112,7 @@
<textarea class="form-control" id="reason" name="reason" placeholder="Enter Reason for Account Request" required></textarea>
</div>
<input class="btn btn-primary btn-block" id="submit" name="submit" type="button" value="Submit" onclick="request_account()">
<input class="btn btn-primary btn-block" id="submit" name="submit" type="button" value="Submit" onclick="displayloading1()">
<div>
<strong id="error" style="color: #be051b; text-align: center;"></strong>
......@@ -117,7 +122,24 @@
</div>
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
<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>
<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">
......
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