Added tos to registration
This commit is contained in:
		| @@ -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() | ||||
|   | ||||
| @@ -39,7 +39,7 @@ | ||||
|                 $('#reset-form').collapse('show'); | ||||
|             }); | ||||
|  | ||||
|             $('#reset').click(function() { | ||||
|             $('#reset').click(function () { | ||||
|                 $.ajax({ | ||||
|                     type: 'POST', | ||||
|                     url: '{% url 'reset token' %}', | ||||
| @@ -123,7 +123,7 @@ | ||||
|                         {{ register.address|add_class:"form-control"|attr:"placeholder:Address" }} | ||||
|                     </div> | ||||
|                     <div class="form-group col-4"> | ||||
|                         {{ register.region|add_class:"form-control"}} | ||||
|                         {{ register.region|add_class:"form-control" }} | ||||
|                     </div> | ||||
|                     <div class="form-group col-12"> | ||||
|                         {{ register.website|add_class:"form-control"|attr:"placeholder:Website" }} | ||||
| @@ -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 %} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user