Skip to content
Snippets Groups Projects
Commit efeb61b8 authored by Mitchell Moore's avatar Mitchell Moore
Browse files

Merge branch 'fix-loading-spinner' into 'master'

Fix loading spinner

See merge request mmoo97/flask_user_reg!39
parents 4563bc29 7afcc88f
No related branches found
No related tags found
No related merge requests found
function displayloading() { function displayloading() {
document.getElementById("notification_window").innerHTML = "" + $('#myModal').modal('show');
"<div class=\"joyride-tip-guide\" data-index=\"0\" style=\"visibility: visible; display: block; top: 77.5px; left: 570px;\"><span class=\"joyride-nub\" style=\"display: none;\"></span><div class=\"joyride-content-wrapper\" role=\"dialog\"><ol>\n" +
" <h4>\n" +
"\n" +
" Your account is pending creation...\n" +
"\n" +
" </h4>\n" +
" <br><p>\n" +
" This can take between 5-10 min.\n" +
" </p>\n" +
" </ol>\n" +
" <img src=\"/static/img/loading.gif\" style=\"width: 35px; height: auto\"> Pending...\n" +
" </div></div>\n" +
"\n" +
" <div class=\"joyride-modal-bg\" style=\"display: block;\"></div>"
} }
function request_account() { function request_account() {
...@@ -26,4 +12,4 @@ function request_account() { ...@@ -26,4 +12,4 @@ function request_account() {
function refresh() { function refresh() {
document.location.reload(true); document.location.reload(true);
} }
\ No newline at end of file
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<head> <head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.7.3/socket.io.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.7.3/socket.io.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
<script src="{{ url_for('static', filename='scripts/function.js') }}"></script> <script src="{{ url_for('static', filename='scripts/function.js') }}"></script>
<script> <script>
...@@ -20,11 +21,8 @@ ...@@ -20,11 +21,8 @@
}) })
socket.on( 'account ready', function( msg ) { socket.on( 'account ready', function( msg ) {
let element = document.getElementById("notification_window"); $('#myModal').modal('hide');
element.parentNode.removeChild(element); alert("Account has been created!");
element.innerHTML = " ";
alert("Account creation successful!");
}) })
socket.on( 'Account creation failed', function( msg ) { socket.on( 'Account creation failed', function( msg ) {
...@@ -104,12 +102,19 @@ ...@@ -104,12 +102,19 @@
</div> </div>
</div> </div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
<div id="notification_window" > <div class="modal-dialog modal-sm" role="document">
</div> <div class="modal-content">
<div class="modal-header">
<div id ="testo"></div> <h4 class="modal-title" id="myModalLabel">Thank you for requesting</h4>
</body> </div>
<div class="modal-body">
<span>We are creating your account. It may take 5-10 minutes.</span>
<img src="{{ url_for('static', filename='img/loading.gif') }}" width="40px">
</div>
</div>
</div>
</div>
<footer> <footer>
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
...@@ -120,6 +125,6 @@ ...@@ -120,6 +125,6 @@
</div> </div>
</div> </div>
</div><!-- /.container --> </div><!-- /.container -->
</footer> </footer>
</body>
</html> </html>
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