From 47b97e0a663b8040df86631388537fe006bc3675 Mon Sep 17 00:00:00 2001 From: Ishan Patel <ishan747@uab.edu> Date: Tue, 22 Oct 2019 17:41:16 +0000 Subject: [PATCH] Removed unused functions from Signup. Edited reg failed error page. - Removed function from signup.html - Script fix - Basic function cleanup - Script src path fix --- app/__init__.py | 5 ++++ app/static/scripts/function.js | 19 ++++++++++++++ app/templates/auth/SignUp.html | 25 ++----------------- app/templates/errors/registration_failed.html | 2 +- 4 files changed, 27 insertions(+), 24 deletions(-) create mode 100644 app/static/scripts/function.js diff --git a/app/__init__.py b/app/__init__.py index dfc4d9d..7f3f38c 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -43,12 +43,17 @@ class MyHandler(FileSystemEventHandler): # Watchdog handler class to take action try: +<<<<<<< Updated upstream if ("/home/reggie/flat_db/" + time_stamp + ".done") in snap_diff.files_moved[0]: # check for timestamped string with .done extention in flat_db +======= + if len(snap_diff.files_moved) > 0 and ("/home/reggie/flat_db/" + time_stamp + ".done") in snap_diff.files_moved[0]: +>>>>>>> Stashed changes observing = False # print("YES!") except Exception as e: print(e) + return render_template('errors/500.html', title='Server Error'), 500 # print("Created: ", snap_diff.files_created) # print("Deleted: ", snap_diff.files_deleted) # print("Modified: ", snap_diff.files_modified) diff --git a/app/static/scripts/function.js b/app/static/scripts/function.js new file mode 100644 index 0000000..8c38ab3 --- /dev/null +++ b/app/static/scripts/function.js @@ -0,0 +1,19 @@ +function displayloading() { + document.getElementById("notification_window").innerHTML = "" + + "<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=\"/register/static/img/loading.gif\" style=\"width: 35px; height: auto\"> Pending...\n" + + " </div></div>\n" + + "\n" + + " <div class=\"joyride-modal-bg\" style=\"display: block;\"></div>" + + + } \ No newline at end of file diff --git a/app/templates/auth/SignUp.html b/app/templates/auth/SignUp.html index b1b55c5..3014cc0 100644 --- a/app/templates/auth/SignUp.html +++ b/app/templates/auth/SignUp.html @@ -3,7 +3,8 @@ {% block title %} User Registration {% endblock %} {% block head %} {{ super() }} -<script src="/register/static/scripts/application.js"></script> +<script src="{{ url_for('static', filename='scripts/function.js') }}"></script> +<script src="{{ url_for('static', filename='scripts/application.js') }}"></script> <style type="text/css"> .important { color: #336699; } </style> @@ -59,28 +60,6 @@ <h2>Hello, {{ user }}!</h2> - <script> - function displayloading() { - document.getElementById("notification_window").innerHTML = "" + - "<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=\"/register/static/img/loading.gif\" style=\"width: 35px; height: auto\"> Pending...\n" + - " </div></div>\n" + - "\n" + - " <div class=\"joyride-modal-bg\" style=\"display: block;\"></div>" - - - } - </script> - <form action="." method="post" onsubmit="displayloading()"> <div class="signUpContainer"> <label><b>{{ form.fullname.label }}<br></b></label> diff --git a/app/templates/errors/registration_failed.html b/app/templates/errors/registration_failed.html index b5a2e73..8386d4b 100644 --- a/app/templates/errors/registration_failed.html +++ b/app/templates/errors/registration_failed.html @@ -6,7 +6,7 @@ </head> <body> - <h2>Something went wrong...</h2> + <h2>Something went right...</h2> <p> Redirecting back to sign-in page in 5 seconds. </p> -- GitLab