forked from gergely/calendar-social
Make it possible to edit one’s profile
…even though it’s only one field yet.
This commit is contained in:
@@ -335,3 +335,16 @@ class FirstStepsForm(FlaskForm):
|
||||
label=_('Your time zone'),
|
||||
validators=[DataRequired()],
|
||||
description=_('The start and end times of events will be displayed in this time zone.'))
|
||||
|
||||
|
||||
class ProfileForm(FlaskForm):
|
||||
"""Form for editing a user profile
|
||||
"""
|
||||
|
||||
display_name = StringField(label=_('Display name'), validators=[DataRequired()])
|
||||
|
||||
def __init__(self, profile, *args, **kwargs):
|
||||
kwargs.update({'display_name': profile.display_name})
|
||||
FlaskForm.__init__(self, *args, **kwargs)
|
||||
|
||||
self.profile = profile
|
||||
|
Reference in New Issue
Block a user