Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
a4fa04ec
Unverified
Commit
a4fa04ec
authored
Dec 19, 2017
by
Bessie Steinberg
Committed by
GitHub
Dec 19, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16931 from edx/bessiesteinberg/WL-1288-registration-page-customization
Add Job Title field to Registration Page
parents
c8d0d5eb
b340174e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
2 deletions
+22
-2
lms/djangoapps/student_account/views.py
+3
-2
openedx/core/djangoapps/user_api/api.py
+18
-0
openedx/core/djangoapps/user_api/tests/test_views.py
+1
-0
No files found.
lms/djangoapps/student_account/views.py
View file @
a4fa04ec
...
...
@@ -433,12 +433,13 @@ def _get_extended_profile_fields():
"state"
:
_
(
u"State/Province/Region"
),
"company"
:
_
(
u"Company"
),
"title"
:
_
(
u"Title"
),
"job_title"
:
_
(
u"Job Title"
),
"mailing_address"
:
_
(
u"Mailing address"
),
"goals"
:
_
(
u"Tell us why you're interested in {platform_name}"
)
.
format
(
platform_name
=
configuration_helpers
.
get_value
(
"PLATFORM_NAME"
,
settings
.
PLATFORM_NAME
)
),
"profession"
:
_
(
"Profession"
),
"specialty"
:
_
(
"Specialty"
)
"profession"
:
_
(
u
"Profession"
),
"specialty"
:
_
(
u
"Specialty"
)
}
extended_profile_field_names
=
configuration_helpers
.
get_value
(
'extended_profile_fields'
,
[])
...
...
openedx/core/djangoapps/user_api/api.py
View file @
a4fa04ec
...
...
@@ -144,6 +144,7 @@ class RegistrationFormFactory(object):
"year_of_birth"
,
"level_of_education"
,
"company"
,
"job_title"
,
"title"
,
"mailing_address"
,
"goals"
,
...
...
@@ -652,6 +653,23 @@ class RegistrationFormFactory(object):
required
=
required
)
def
_add_job_title_field
(
self
,
form_desc
,
required
=
False
):
"""Add a Job Title field to a form description.
Arguments:
form_desc: A form description
Keyword Arguments:
required (bool): Whether this field is required; defaults to False
"""
# Translators: This label appears above a field on the registration form
# which allows the user to input the Job Title
job_title_label
=
_
(
u"Job Title"
)
form_desc
.
add_field
(
"job_title"
,
label
=
job_title_label
,
required
=
required
)
def
_add_first_name_field
(
self
,
form_desc
,
required
=
False
):
"""Add a First Name field to a form description.
Arguments:
...
...
openedx/core/djangoapps/user_api/tests/test_views.py
View file @
a4fa04ec
...
...
@@ -1731,6 +1731,7 @@ class RegistrationViewTest(ThirdPartyAuthTestMixin, UserAPITestCase):
"level_of_education"
,
"company"
,
"title"
,
"job_title"
,
"mailing_address"
,
"goals"
,
"honor_code"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment