comparison bio/forms.py @ 1123:ce6a0c12cbf3

Convert edit profile to V3 design.
author Brian Neal <bgneal@gmail.com>
date Wed, 17 Aug 2016 20:39:07 -0500
parents 6bf83070b19f
children
comparison
equal deleted inserted replaced
1122:2574cd24773e 1123:ce6a0c12cbf3
29 fields = ('first_name', 'last_name', 'email') 29 fields = ('first_name', 'last_name', 'email')
30 30
31 31
32 class EditUserProfileForm(forms.ModelForm): 32 class EditUserProfileForm(forms.ModelForm):
33 """Form for editing the fields of the UserProfile model.""" 33 """Form for editing the fields of the UserProfile model."""
34 location = forms.CharField(required=False, widget=forms.TextInput(attrs={'size': 64 }))
35 occupation = forms.CharField(required=False, widget=forms.TextInput(attrs={'size': 64 }))
36 interests = forms.CharField(required=False, widget=forms.TextInput(attrs={'size': 64 }))
37 time_zone = forms.CharField(required=False, widget=forms.HiddenInput()) 34 time_zone = forms.CharField(required=False, widget=forms.HiddenInput())
38 use_24_time = forms.BooleanField(label='Show times in 24-hour mode', required=False) 35 use_24_time = forms.BooleanField(label='Show times in 24-hour mode', required=False)
39 profile_text = forms.CharField(required=False, 36 hide_email = forms.BooleanField(
40 widget=forms.Textarea(attrs={'class': 'markItUp'})) 37 label="Don't show my email address on my public profile",
41 signature = forms.CharField(required=False, 38 required=False)
42 widget=forms.Textarea(attrs={'class': 'markItUp'}))
43 auto_favorite = forms.BooleanField( 39 auto_favorite = forms.BooleanField(
44 label='Automatically favorite every forum topic I create or reply to', required=False) 40 label='Automatically favorite every forum topic I create or reply to',
41 required=False)
45 auto_subscribe = forms.BooleanField( 42 auto_subscribe = forms.BooleanField(
46 label='Automatically subscribe to every forum topic I create or reply to', required=False) 43 label='Automatically subscribe to every forum topic I create or reply to',
44 required=False)
47 45
48 class Meta: 46 class Meta:
49 model = UserProfile 47 model = UserProfile
50 fields = ('location', 'country', 'birthday', 'occupation', 'interests', 48 fields = ('location', 'country', 'birthday', 'occupation', 'interests',
51 'profile_text', 'hide_email', 'signature', 'time_zone', 49 'profile_text', 'hide_email', 'signature', 'time_zone',