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.delete_submit() }}