diff --git a/canaille/account.py b/canaille/account.py index 39a512b6..3b78e619 100644 --- a/canaille/account.py +++ b/canaille/account.py @@ -58,6 +58,7 @@ def profile(user): for k, v in claims.items() } form = ProfileForm(request.form or None, data=data) + form.sub.render_kw["readonly"] = "true" if request.form: if not form.validate(): diff --git a/canaille/forms.py b/canaille/forms.py index 65106b51..5c5dca69 100644 --- a/canaille/forms.py +++ b/canaille/forms.py @@ -50,7 +50,7 @@ class PasswordResetForm(FlaskForm): class ProfileForm(FlaskForm): sub = wtforms.StringField( _("Username"), - render_kw={"readonly": "true"}, + render_kw={"placeholder": _("jdoe")}, ) # name = wtforms.StringField(_("Name")) given_name = wtforms.StringField(