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
0085a2ca
Commit
0085a2ca
authored
Sep 10, 2013
by
Pavel Yushchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes registration
parent
79a34072
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
common/djangoapps/student/views.py
+6
-1
lms/templates/signup_modal.html
+2
-2
No files found.
common/djangoapps/student/views.py
View file @
0085a2ca
...
@@ -648,7 +648,7 @@ def create_account(request, post_override=None):
...
@@ -648,7 +648,7 @@ def create_account(request, post_override=None):
for
a
in
[
'email'
,
'password'
,
"lastname"
,
"firstname"
,
"middlename"
,
"year_of_birth"
,
for
a
in
[
'email'
,
'password'
,
"lastname"
,
"firstname"
,
"middlename"
,
"year_of_birth"
,
"level_of_education"
,
"education_place"
,
"education_year"
,
"level_of_education"
,
"education_place"
,
"education_year"
,
"work_type"
,
"work_number"
,
"work_name"
,
"work_login"
,
"work_location"
,
"work_type"
,
"work_number"
,
"work_name"
,
"work_login"
,
"work_location"
,
"work_occupation"
,
"work_teaching_experience"
,
"work_qualification_category"
,
"work_qualification_category_year"
,
"work_occupation"
,
"work_
occupation_other"
,
"work_
teaching_experience"
,
"work_qualification_category"
,
"work_qualification_category_year"
,
"contact_phone"
]:
"contact_phone"
]:
if
a
not
in
post_vars
:
if
a
not
in
post_vars
:
js
[
'value'
]
=
ugettext_lazy
(
"Error (401 {field}). E-mail us."
)
.
format
(
field
=
a
)
js
[
'value'
]
=
ugettext_lazy
(
"Error (401 {field}). E-mail us."
)
.
format
(
field
=
a
)
...
@@ -690,6 +690,11 @@ def create_account(request, post_override=None):
...
@@ -690,6 +690,11 @@ def create_account(request, post_override=None):
js
[
'field'
]
=
"level_of_education"
js
[
'field'
]
=
"level_of_education"
return
HttpResponse
(
json
.
dumps
(
js
,
cls
=
LazyEncoder
))
return
HttpResponse
(
json
.
dumps
(
js
,
cls
=
LazyEncoder
))
if
post_vars
[
"work_occupation"
]
==
'other'
and
"work_occupation2"
in
post_vars
:
post_vars
.
post_vars
[
"work_occupation"
]
=
post_vars
[
"work_occupation2"
]
if
post_vars
[
"work_occupation_other"
]
==
'other'
and
"work_occupation_other2"
in
post_vars
:
post_vars
.
post_vars
[
"work_occupation_other"
]
=
post_vars
[
"work_occupation_other2"
]
for
a
in
required_post_vars
:
for
a
in
required_post_vars
:
if
len
(
post_vars
[
a
])
<
1
:
if
len
(
post_vars
[
a
])
<
1
:
error_str
=
{
'username'
:
ugettext_lazy
(
'Username must be minimum of two characters long.'
),
error_str
=
{
'username'
:
ugettext_lazy
(
'Username must be minimum of two characters long.'
),
...
...
lms/templates/signup_modal.html
View file @
0085a2ca
...
@@ -157,7 +157,7 @@ $(document).ready(function(){
...
@@ -157,7 +157,7 @@ $(document).ready(function(){
<option
value=
"${code}"
>
${_(wo_occ)}
</option>
<option
value=
"${code}"
>
${_(wo_occ)}
</option>
%endfor
%endfor
</select>
</select>
<input
id=
"work-occupation2"
type=
"text"
name=
"work_occupation"
value=
""
style=
"display:none"
/>
<input
id=
"work-occupation2"
type=
"text"
name=
"work_occupation
2
"
value=
""
style=
"display:none"
/>
</span>
</span>
<span
class=
"field select"
id=
"field-work-occupation-other"
>
<span
class=
"field select"
id=
"field-work-occupation-other"
>
<label
for=
"work-occupation-other"
>
${_("Another occupation at educational institution")}
</label>
<label
for=
"work-occupation-other"
>
${_("Another occupation at educational institution")}
</label>
...
@@ -167,7 +167,7 @@ $(document).ready(function(){
...
@@ -167,7 +167,7 @@ $(document).ready(function(){
<option
value=
"${code}"
>
${_(wo_occ)}
</option>
<option
value=
"${code}"
>
${_(wo_occ)}
</option>
%endfor
%endfor
</select>
</select>
<input
id=
"work-occupation-other2"
type=
"text"
name=
"work_occupation_other"
value=
""
style=
"display:none"
/>
<input
id=
"work-occupation-other2"
type=
"text"
name=
"work_occupation_other
2
"
value=
""
style=
"display:none"
/>
</span>
</span>
<span
class=
"field required text"
id=
"field-work-teaching-experience"
>
<span
class=
"field required text"
id=
"field-work-teaching-experience"
>
<label
for=
"work-work_teaching_experience"
>
${_('Educational experience at educational institution')}
</label>
<label
for=
"work-work_teaching_experience"
>
${_('Educational experience at educational institution')}
</label>
...
...
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