From 1d8dd83086050afe585932e81e52edcff5f928b3 Mon Sep 17 00:00:00 2001 From: Yapollon Date: Thu, 7 Mar 2024 18:48:19 +0100 Subject: [PATCH] MIGRATE: Implemented user color setting. --- app.py | 1 + static/script/script-profile.js | 6 +++--- templates/profile.html | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app.py b/app.py index 8ddb275..3445429 100644 --- a/app.py +++ b/app.py @@ -297,6 +297,7 @@ def habit_list_create(): @app.route('/profile') @login_required def profile(): + print(current_user.name, current_user.email) return render_template( "profile.html", name=current_user.name, diff --git a/static/script/script-profile.js b/static/script/script-profile.js index 42c58c3..153f6dd 100644 --- a/static/script/script-profile.js +++ b/static/script/script-profile.js @@ -35,9 +35,9 @@ document.addEventListener("DOMContentLoaded", function() { // Add event listener to edit button to open modal editButton.addEventListener("click", function() { editModal.show(); - document.getElementById("newName").value = "{{ name }}"; - document.getElementById("newEmail").value = "{{ email }}"; - document.getElementById("password").value = ""; + // document.getElementById("newName").value = "{{ name }}"; + // document.getElementById("newEmail").value = "{{ email }}"; + // document.getElementById("password").value = ""; }); // Add event listener to save changes button to submit form diff --git a/templates/profile.html b/templates/profile.html index 66a9de7..aee799f 100644 --- a/templates/profile.html +++ b/templates/profile.html @@ -77,12 +77,12 @@
- +
- +
@@ -102,4 +102,5 @@ + {% endblock %} \ No newline at end of file