Strip whitespace from username field when editing User

Otherwise can be a gotcha, if user doesn't know their username "has a
space" etc.
This commit is contained in:
Lance Edgar 2016-10-10 10:58:49 -05:00
parent b157b79938
commit 3b84a92d7d

View file

@ -157,7 +157,7 @@ class UsersView(MasterView):
readonly=True)
def configure_fieldset(self, fs):
fs.username.set(validate=unique_username)
fs.username.set(renderer=forms.renderers.StrippedTextFieldRenderer, validate=unique_username)
fs.person.set(options=[])
fs.person.set(renderer=forms.renderers.PersonFieldLinkRenderer)
fs.append(PasswordField('password', label="Set Password"))