Commit 32509d3487625bd6c0386c899f852efefb8e58cc
Committed by
Sergio Oliveira
1 parent
57ab116b
Exists in
master
and in
39 other branches
Added CSS styling to force lowercase
Showing
1 changed file
with
5 additions
and
0 deletions
Show diff stats
colab/accounts/forms.py
@@ -27,6 +27,11 @@ class SocialAccountField(forms.Field): | @@ -27,6 +27,11 @@ class SocialAccountField(forms.Field): | ||
27 | 27 | ||
28 | 28 | ||
29 | class UserForm(forms.ModelForm): | 29 | class UserForm(forms.ModelForm): |
30 | + username = forms.CharField( | ||
31 | + | ||
32 | + # Forces username to be lowercase always | ||
33 | + widget=forms.TextInput(attrs={'style' : 'text-transform: lowercase;'}), | ||
34 | + ) | ||
30 | required = ('first_name', 'last_name', 'email', 'username') | 35 | required = ('first_name', 'last_name', 'email', 'username') |
31 | 36 | ||
32 | class Meta: | 37 | class Meta: |