1
1
Fork 0

Little late-night improvement

dev
Jan Kužílek 5 years ago
parent 000928e05d
commit 14b5352442

@ -35,7 +35,7 @@ def settings():
def change_info(): def change_info():
form = ChangeUserInfoForm(request.form) form = ChangeUserInfoForm(request.form)
if form.validate(): if form.validate():
current_user.biography = form.bio.data current_user.biography = form.bio.data.strip()
db.session.commit() db.session.commit()
flash('Your biography was updated.') flash('Your biography was updated.')

@ -13,10 +13,12 @@
{{ form.password(placeholder="Password") }} {{ form.password(placeholder="Password") }}
{{ errors(form.password) }} {{ errors(form.password) }}
<div class="row"> <ul>
{{ form.remember_me() }} {{ form.remember_me.label }} <li>
{{ errors(form.remember_me) }} {{ form.remember_me() }}{{ form.remember_me.label }}
</div> </li>
</ul>
{{ errors(form.remember_me) }}
<div class="row stretch"> <div class="row stretch">
{{ form.submit() }} {{ form.submit() }}
<a href="{{ url_for('auth.reset_password') }}">Forgotten password?</a> <a href="{{ url_for('auth.reset_password') }}">Forgotten password?</a>

@ -60,14 +60,16 @@
<h3>Delete user data</h3> <h3>Delete user data</h3>
<form action="{{ url_for('user.delete_data') }}" method="post"> <form action="{{ url_for('user.delete_data') }}" method="post">
{{ delete_form.csrf_token }} {{ delete_form.csrf_token }}
<ul>
{{ delete_form.all_comments() }}{{ delete_form.all_comments.label }} <li>
{{ errors(delete_form.all_posts) }} {{ delete_form.all_comments() }}{{ delete_form.all_comments.label }}
{{ errors(delete_form.all_comments) }}
<div> </li>
{{ delete_form.all_posts() }}{{ delete_form.all_posts.label }} <li>
{{ errors(delete_form.all_posts) }} {{ delete_form.all_posts() }}{{ delete_form.all_posts.label }}
</div> {{ errors(delete_form.all_posts) }}
</li>
</ul>
{{ delete_form.delete_submit() }} {{ delete_form.delete_submit() }}
</form> </form>

Loading…
Cancel
Save