do not show email

This commit is contained in:
Son NK 2019-11-17 10:10:31 +01:00
parent b5e68a9453
commit 64180c4077
3 changed files with 12 additions and 4 deletions

View File

@ -14,6 +14,13 @@
<input type="hidden" name="form-name" value="update-profile">
<h3>Profile</h3>
<div class="form-group">
<label class="form-label">Email</label>
{{ form.email(class="form-control", value=current_user.email, readonly=True) }}
{{ render_field_errors(form.email) }}
</div>
<div class="form-group">
<label class="form-label">Name</label>
{{ form.name(class="form-control", value=current_user.name) }}

View File

@ -16,6 +16,7 @@ from app.utils import random_string
class SettingForm(FlaskForm):
email = StringField("Email")
name = StringField("Name", validators=[validators.DataRequired()])
profile_picture = FileField("Profile Picture")

View File

@ -33,11 +33,11 @@
<span class="ml-2 d-none d-lg-block">
<span class="text-default">
{{ current_user.name }}
{% if current_user.is_premium() %}
- <small class="text-success">Premium</small>
{% endif %}
</span>
<small class="text-muted d-block mt-1">{{ current_user.email }}</small>
{% if current_user.is_premium() %}
<small class="text-success d-block mt-1">Premium</small>
{% endif %}
</span>
</a>