Compare commits

..

2 Commits

Author SHA1 Message Date
Yapollon
8094bd7865 Merge remote-tracking branch 'origin/master' 2024-03-07 18:48:30 +01:00
Yapollon
1d8dd83086 MIGRATE: Implemented user color setting. 2024-03-07 18:48:19 +01:00
3 changed files with 7 additions and 5 deletions

1
app.py
View File

@ -297,6 +297,7 @@ def habit_list_create():
@app.route('/profile') @app.route('/profile')
@login_required @login_required
def profile(): def profile():
print(current_user.name, current_user.email)
return render_template( return render_template(
"profile.html", "profile.html",
name=current_user.name, name=current_user.name,

View File

@ -35,9 +35,9 @@ document.addEventListener("DOMContentLoaded", function() {
// Add event listener to edit button to open modal // Add event listener to edit button to open modal
editButton.addEventListener("click", function() { editButton.addEventListener("click", function() {
editModal.show(); editModal.show();
document.getElementById("newName").value = "{{ name }}"; // document.getElementById("newName").value = "{{ name }}";
document.getElementById("newEmail").value = "{{ email }}"; // document.getElementById("newEmail").value = "{{ email }}";
document.getElementById("password").value = ""; // document.getElementById("password").value = "";
}); });
// Add event listener to save changes button to submit form // Add event listener to save changes button to submit form

View File

@ -102,4 +102,5 @@
<script src="../static/script/script-profile.js"></script> <script src="../static/script/script-profile.js"></script>
{% endblock %} {% endblock %}