Added tos to registration

This commit is contained in:
Zakary Timson 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()

View File

@ -165,6 +165,17 @@
<div class="form-group col-12">
{{ register.request_training|add_class:"form-control"|attr:"placeholder:Training I would like to recieve..." }}
</div>
<div class="form-group col-12 my-3">
<div class="form-check">
{{ register.tos|add_class:"form-check-input" }} <label class="form-check-label">
I certify that I am a member in good standing of the Law Society of Ontario, practicing in
the field of defence side child protection law, or am a member of the Rights Panel with the
office of The Children's Lawyer, also practicing defence work, or am a law student, lawyer
representing a band or Native Organization, or a student completing articles under the
direction of one of the foregoing.
</label>
</div>
</div>
</div>
<button class="btn btn-primary col-12 mb-2 p-2">Register</button>
@ -176,7 +187,8 @@
<button id="reset" class="btn btn-primary col-12 mb-2 p-2">Reset</button>
</div>
<div id="reset-confirm" class="alert alert-success collapse">Instructions have been sent to your email.</div>
<div id="reset-confirm" class="alert alert-success collapse">Instructions have been sent to your email.
</div>
</div>
</div>
{% endblock %}