Add a Primary Language Field to the Registration Page
Description
A new field, primary_lang, needs to be added to the registration page. This field will allow users to specify their primary language during registration. The data entered in this field should also be sent to the backend and stored in the database.
Task Details
-
Frontend Changes:
- Modify the
register.jsx file located in codebase/frontend/src/pages/.
- Add a new input field labeled "primary_lang" to the registration form.
- Ensure the input field is included in the form data sent to the backend upon submission.
-
Backend Changes:
- Modify the
auth.js file located in codebase/backend/controllers/.
- Ensure the `primary_lang field is received and stored in the database when a user registers.
- Remove any default value for
primary_lang and ensure it is dynamically set based on user input.
-
Database Integration:
- Confirm that the
primary_lang field is properly saved to the database as part of the user's data.
primary_lang field name should be same with the one included in codebase/backend/models/User.js file.
-
Follow Pull Request Guidelines:
- Make sure the
primary_lang field is optional to avoid breaking existing functionality.
- Use meaningful variable names and provide comments where necessary.
- Follow the Pull_request_template.md file when submitting the Pull Request.
Add a Primary Language Field to the Registration Page
Description
A new field,
primary_lang, needs to be added to the registration page. This field will allow users to specify their primary language during registration. The data entered in this field should also be sent to the backend and stored in the database.Task Details
Frontend Changes:
register.jsxfile located incodebase/frontend/src/pages/.Backend Changes:
auth.jsfile located incodebase/backend/controllers/.primary_langand ensure it is dynamically set based on user input.Database Integration:
primary_langfield is properly saved to the database as part of the user's data.primary_langfield name should be same with the one included incodebase/backend/models/User.jsfile.Follow Pull Request Guidelines:
primary_langfield is optional to avoid breaking existing functionality.