diff --git a/calsocial/forms.py b/calsocial/forms.py index 3ba1614..ac90df5 100644 --- a/calsocial/forms.py +++ b/calsocial/forms.py @@ -343,9 +343,11 @@ class ProfileForm(FlaskForm): """ display_name = StringField(label=_('Display name'), validators=[DataRequired()]) + locked = BooleanField(label=_('Lock profile')) def __init__(self, profile, *args, **kwargs): kwargs.update({'display_name': profile.display_name}) + kwargs.update({'locked': profile.locked}) FlaskForm.__init__(self, *args, **kwargs) self.profile = profile diff --git a/calsocial/templates/profile-edit.html b/calsocial/templates/profile-edit.html index f84d5c1..0953be4 100644 --- a/calsocial/templates/profile-edit.html +++ b/calsocial/templates/profile-edit.html @@ -12,6 +12,11 @@ {{ form.display_name }}
+ {{ form.locked.errors }} + {{ form.locked.label }} + {{ form.locked}} +
+ {% endblock content %}