Requires
- module:React.useState
- module:react-toastify
- module:getToken
Methods
# static change()
This function handles all the changes made in the registration form fields.
- To Do:
-
- Turn the update state function into a dynamic key value pair implementation with the spread operator.
# static nextStep()
A simple increment function to move between Registration steps.
The next step function is called when the next button is clicked on the registration form. It performs multiple validation checks. It renders an errors upon incomplete fields and allows progress if no errors are present. If no validation errors are present, the step is incremented and the field values are saved in the component state.
# static previousStep()
A simple decrement function to move between Registration steps.
The previous step function is called when the back button is clicked on the registration form. It does not perform any validations, it simply decrements the step. If the user selected to be a student, the backwards step is set to 2, as the student does not have to fill out the professor information fields, present in step 2. If the user selected to be a professor, the backwards step is set to 1.
Type Definitions
# InstructorRegister
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
title |
String
|
<optional> |
|
officeHours |
String
|
<optional> |
|
officeLocation |
String
|
<optional> |
|
phone |
String
|
<optional> |
|
contactPolicy |
String
|
<optional> |
|
background |
String
|
<optional> |
|
researchInterests |
String
|
<optional> |
|
selectedPapersAndPublications |
String
|
<optional> |
|
website |
String
|
<optional> |
|
philosophy |
String
|
<optional> |
# State
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
instructor |
InstructorRegister
|
<optional> |
|
setInstructorProfile |
setInstructorProfile
|
# UserRegister
Properties:
| Name | Type | Description |
|---|---|---|
firstName |
String
|
|
lastName |
String
|
|
middleName |
String
|
|
email |
String
|
The email address of the user. |
password |
String
|
|
passwordConf |
String
|
|
group |
String
|