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
55ee3110
Commit
55ee3110
authored
Sep 06, 2013
by
yushchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add check for numeric fields
parent
693e661d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletions
+9
-1
common/djangoapps/student/views.py
+8
-0
lms/templates/courseware/course_navigation.html
+1
-1
No files found.
common/djangoapps/student/views.py
View file @
55ee3110
...
@@ -711,6 +711,14 @@ def create_account(request, post_override=None):
...
@@ -711,6 +711,14 @@ def create_account(request, post_override=None):
js
[
'field'
]
=
a
js
[
'field'
]
=
a
return
HttpResponse
(
json
.
dumps
(
js
))
return
HttpResponse
(
json
.
dumps
(
js
))
numeric_post_vars
=
[
"education_year"
,
"work_managing_experience"
,
"work_teaching_experience"
,
"work_qualification_category_year"
,
"contact_phone"
]
for
a
in
numeric_post_vars
:
if
len
(
post_vars
[
a
])
>
0
and
not
post_vars
[
a
]
.
isdigit
():
js
[
'value'
]
=
_
(
"Field must be numeric"
)
js
[
'field'
]
=
a
return
HttpResponse
(
json
.
dumps
(
js
))
try
:
try
:
validate_email
(
post_vars
[
'email'
])
validate_email
(
post_vars
[
'email'
])
except
ValidationError
:
except
ValidationError
:
...
...
lms/templates/courseware/course_navigation.html
View file @
55ee3110
...
@@ -21,7 +21,7 @@ def url_class(is_active):
...
@@ -21,7 +21,7 @@ def url_class(is_active):
% for tab in get_course_tabs(user, course, active_page):
% for tab in get_course_tabs(user, course, active_page):
<li>
<li>
<a
href=
"${tab.link | h}"
class=
"${url_class(tab.is_active)}"
>
<a
href=
"${tab.link | h}"
class=
"${url_class(tab.is_active)}"
>
${_(tab.name
| h)
}
${_(tab.name
) | h
}
% if tab.is_active == True:
% if tab.is_active == True:
<span
class=
"sr"
>
, current location
</span>
<span
class=
"sr"
>
, current location
</span>
%endif
%endif
...
...
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