Added tos to registration

This commit is contained in:
2018-01-27 11:17:40 -05:00
parent 0ea98fbd49
commit 3b1f8aa6f5
2 changed files with 17 additions and 4 deletions

View File

@ -27,10 +27,11 @@ class RegisterForm(forms.ModelForm):
password1 = forms.CharField(widget=forms.PasswordInput(), validators=[password_length])
password2 = forms.CharField(widget=forms.PasswordInput())
provide_training = forms.CharField(max_length=255, required=False, label='Offer Training For...')
tos = forms.BooleanField(initial=False, required=True)
class Meta:
model = Attorney
fields = ['first_name', 'last_name', 'region', 'password1', 'password2', 'image', 'email', 'address', 'phone', 'website', 'call_to_bar', 'lso', 'biography', 'provide_training', 'request_training', 'case_law', 'newsletter']
fields = ['first_name', 'last_name', 'region', 'password1', 'password2', 'image', 'email', 'address', 'phone', 'website', 'call_to_bar', 'lso', 'biography', 'provide_training', 'request_training', 'case_law', 'newsletter', 'tos']
def clean(self):
cleaned_data = super().clean()