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
e7ece2cf
Commit
e7ece2cf
authored
Sep 04, 2013
by
Pavel Yushchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes registration form
parent
25bbecee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
6 deletions
+32
-6
common/djangoapps/student/views.py
+6
-1
lms/templates/signup_modal.html
+26
-5
No files found.
common/djangoapps/student/views.py
View file @
e7ece2cf
...
@@ -670,13 +670,18 @@ def create_account(request, post_override=None):
...
@@ -670,13 +670,18 @@ def create_account(request, post_override=None):
# TODO: Check password is sane
# TODO: Check password is sane
required_post_vars
=
[
"email"
,
"password"
,
"lastname"
,
"firstname"
,
"middlename"
,
"year_of_birth"
,
required_post_vars
=
[
"email"
,
"password"
,
"lastname"
,
"firstname"
,
"middlename"
,
"year_of_birth"
,
"
level_of_education"
,
"
education_place"
,
"education_year"
,
"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_teaching_experience"
,
"work_qualification_category"
,
"work_qualification_category_year"
,
"contact_phone"
,
"terms_of_service"
,
"honor_code"
]
"contact_phone"
,
"terms_of_service"
,
"honor_code"
]
if
tos_not_required
:
if
tos_not_required
:
required_post_vars
=
[
'username'
,
'email'
,
'name'
,
'password'
,
'honor_code'
]
required_post_vars
=
[
'username'
,
'email'
,
'name'
,
'password'
,
'honor_code'
]
if
len
(
post_vars
[
"level_of_education"
]
<
1
):
js
[
'value'
]
=
_
(
'Education level is required'
)
js
[
'field'
]
=
"level_of_education"
return
HttpResponse
(
json
.
dumps
(
js
))
for
a
in
required_post_vars
:
for
a
in
required_post_vars
:
if
len
(
post_vars
[
a
])
<
2
:
if
len
(
post_vars
[
a
])
<
2
:
error_str
=
{
'username'
:
_
(
'Username must be minimum of two characters long.'
),
error_str
=
{
'username'
:
_
(
'Username must be minimum of two characters long.'
),
...
...
lms/templates/signup_modal.html
View file @
e7ece2cf
...
@@ -84,6 +84,9 @@
...
@@ -84,6 +84,9 @@
<label
for=
"education-specialty"
>
${_('Diploma specialty')}
</label>
<label
for=
"education-specialty"
>
${_('Diploma specialty')}
</label>
<input
id=
"education-specialty"
type=
"text"
name=
"education_specialty"
value=
""
/>
<input
id=
"education-specialty"
type=
"text"
name=
"education_specialty"
value=
""
/>
</span>
</span>
<div
class=
"input-group"
>
<span
class=
"field required select"
id=
"field-work-type"
>
<span
class=
"field required select"
id=
"field-work-type"
>
<label
for=
"work-type"
>
${_("Type of educational institution")}
</label>
<label
for=
"work-type"
>
${_("Type of educational institution")}
</label>
<select
id=
"work-type"
name=
"work_type"
>
<select
id=
"work-type"
name=
"work_type"
>
...
@@ -95,15 +98,31 @@
...
@@ -95,15 +98,31 @@
</span>
</span>
<span
class=
"field required text"
id=
"field-work-number"
>
<span
class=
"field required text"
id=
"field-work-number"
>
<label
for=
"work-number"
>
${_('Number of educational institution')}
</label>
<label
for=
"work-number"
>
${_('Number of educational institution')}
</label>
<input
id=
"work-number"
type=
"text"
name=
"work_number"
value=
""
required
aria-required=
"true"
/>
<input
id=
"work-number"
type=
"text"
name=
"work_number"
value=
""
placeholder=
"${_('e.g. 9999')}"
required
aria-required=
"true"
/>
<span
style=
"
display: block;
/* text-align: right; */
font-size: smaller;
color: gray;
top: -10px;
position: relative;
"
>
Если образовательное не имеет номера, введите 0000
</span>
</span>
</span>
<span
class=
"field required text"
id=
"field-work-name"
>
<span
class=
"field required text"
id=
"field-work-name"
>
<label
for=
"work-name"
>
${_('Name of educational institution')}
</label>
<label
for=
"work-name"
>
${_('Name of educational institution')}
</label>
<input
id=
"work-name"
type=
"text"
name=
"work_name"
value=
""
required
aria-required=
"true"
/>
<input
id=
"work-name"
type=
"text"
name=
"work_name"
value=
""
placeholder=
"${_('e.g. School of art')}"
required
aria-required=
"true"
/>
</span>
</span>
<span
class=
"field required text"
id=
"field-work-login"
>
<span
class=
"field required text"
id=
"field-work-login"
>
<label
for=
"work-login"
>
${_('StatGrad login of educational institution')}
</label>
<label
for=
"work-login"
>
${_('StatGrad login of educational institution')}
</label>
<input
id=
"work-login"
type=
"text"
name=
"work_login"
value=
""
required
aria-required=
"true"
/>
<input
id=
"work-login"
type=
"text"
name=
"work_login"
value=
""
placeholder=
"${_('e.g. sch9999')}"
required
aria-required=
"true"
/>
<span
style=
"
display: block;
/* text-align: right; */
font-size: smaller;
color: gray;
top: -10px;
position: relative;
"
>
Логин образовательного учреждения можно узнать у администрации ОУ. Если у Вашего образовательного учреждения нет логина в системе СтатГрад, укажите sch9876.
</span>
</span>
</span>
<span
class=
"field required select"
id=
"field-work-location"
>
<span
class=
"field required select"
id=
"field-work-location"
>
<label
for=
"work-location"
>
${_("Okrug of educational institution")}
</label>
<label
for=
"work-location"
>
${_("Okrug of educational institution")}
</label>
...
@@ -153,11 +172,13 @@
...
@@ -153,11 +172,13 @@
<label
for=
"work-qualification-category-year"
>
${_('Qualification category year')}
</label>
<label
for=
"work-qualification-category-year"
>
${_('Qualification category year')}
</label>
<input
id=
"work-qualification-category-year"
type=
"text"
name=
"work_qualification_category_year"
value=
""
required
aria-required=
"true"
/>
<input
id=
"work-qualification-category-year"
type=
"text"
name=
"work_qualification_category_year"
value=
""
required
aria-required=
"true"
/>
</span>
</span>
</div>
<div
class=
"input-group"
>
<span
class=
"field required text"
id=
"field-contact-phone"
>
<span
class=
"field required text"
id=
"field-contact-phone"
>
<label
for=
"contact-phone"
>
${_('Contact phone')}
</label>
<label
for=
"contact-phone"
>
${_('Contact phone')}
</label>
<input
id=
"contact-phone"
type=
"text"
name=
"contact_phone"
value=
""
required
aria-required=
"true"
/>
<input
id=
"contact-phone"
type=
"text"
name=
"contact_phone"
value=
""
placeholder=
"${_('e.g. 9091234567')}"
required
aria-required=
"true"
/>
</span>
</span>
</div>
</div>
</div>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
...
...
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