From 14b5352442627367fb4528616c7910f5674e6c25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ku=C5=BE=C3=ADlek?= Date: Sat, 14 Mar 2020 00:36:08 +0100 Subject: [PATCH] Little late-night improvement --- yadc/bp/user.py | 2 +- yadc/templates/auth/login.html | 10 ++++++---- yadc/templates/user/settings.html | 18 ++++++++++-------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/yadc/bp/user.py b/yadc/bp/user.py index 66d37ac..4bc20a9 100644 --- a/yadc/bp/user.py +++ b/yadc/bp/user.py @@ -35,7 +35,7 @@ def settings(): def change_info(): form = ChangeUserInfoForm(request.form) if form.validate(): - current_user.biography = form.bio.data + current_user.biography = form.bio.data.strip() db.session.commit() flash('Your biography was updated.') diff --git a/yadc/templates/auth/login.html b/yadc/templates/auth/login.html index 092d3a8..6167859 100644 --- a/yadc/templates/auth/login.html +++ b/yadc/templates/auth/login.html @@ -13,10 +13,12 @@ {{ form.password(placeholder="Password") }} {{ errors(form.password) }} -
- {{ form.remember_me() }} {{ form.remember_me.label }} - {{ errors(form.remember_me) }} -
+ + {{ errors(form.remember_me) }}
{{ form.submit() }} Forgotten password? diff --git a/yadc/templates/user/settings.html b/yadc/templates/user/settings.html index ba61d01..7d7663d 100644 --- a/yadc/templates/user/settings.html +++ b/yadc/templates/user/settings.html @@ -60,14 +60,16 @@

Delete user data

{{ delete_form.csrf_token }} - - {{ delete_form.all_comments() }}{{ delete_form.all_comments.label }} - {{ errors(delete_form.all_posts) }} - -
- {{ delete_form.all_posts() }}{{ delete_form.all_posts.label }} - {{ errors(delete_form.all_posts) }} -
+
    +
  • + {{ delete_form.all_comments() }}{{ delete_form.all_comments.label }} + {{ errors(delete_form.all_comments) }} +
  • +
  • + {{ delete_form.all_posts() }}{{ delete_form.all_posts.label }} + {{ errors(delete_form.all_posts) }} +
  • +
{{ delete_form.delete_submit() }}