Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
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
course-discovery
Commits
230d1c39
Commit
230d1c39
authored
Jun 01, 2017
by
Asad Azam
Committed by
AsadAzam
Jun 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Xseries and Micromasters name error
parent
f80152cb
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
32 additions
and
8 deletions
+32
-8
course_discovery/apps/publisher/forms.py
+8
-0
course_discovery/conf/locale/en/LC_MESSAGES/django.mo
+0
-0
course_discovery/conf/locale/en/LC_MESSAGES/django.po
+9
-1
course_discovery/conf/locale/en/LC_MESSAGES/djangojs.mo
+0
-0
course_discovery/conf/locale/en/LC_MESSAGES/djangojs.po
+1
-1
course_discovery/conf/locale/eo/LC_MESSAGES/django.mo
+0
-0
course_discovery/conf/locale/eo/LC_MESSAGES/django.po
+9
-1
course_discovery/conf/locale/eo/LC_MESSAGES/djangojs.mo
+0
-0
course_discovery/conf/locale/eo/LC_MESSAGES/djangojs.po
+1
-1
course_discovery/templates/publisher/course_run/edit_run_form.html
+4
-4
No files found.
course_discovery/apps/publisher/forms.py
View file @
230d1c39
...
...
@@ -323,10 +323,18 @@ class CustomCourseRunForm(CourseRunForm):
max_effort
=
cleaned_data
.
get
(
"max_effort"
)
start
=
cleaned_data
.
get
(
"start"
)
end
=
cleaned_data
.
get
(
"end"
)
is_xseries
=
cleaned_data
.
get
(
"is_xseries"
)
xseries_name
=
cleaned_data
.
get
(
"xseries_name"
)
is_micromasters
=
cleaned_data
.
get
(
"is_micromasters"
)
micromasters_name
=
cleaned_data
.
get
(
"micromasters_name"
)
if
start
and
end
and
start
>
end
:
raise
ValidationError
({
'start'
:
_
(
'Start date cannot be after the End date'
)})
if
min_effort
and
max_effort
and
min_effort
>
max_effort
:
raise
ValidationError
({
'min_effort'
:
_
(
'Minimum effort cannot be greater than Maximum effort'
)})
if
is_xseries
and
not
xseries_name
:
raise
ValidationError
({
'xseries_name'
:
_
(
'Enter XSeries program name'
)})
if
is_micromasters
and
not
micromasters_name
:
raise
ValidationError
({
'micromasters_name'
:
_
(
'Enter Micromasters program name'
)})
return
cleaned_data
...
...
course_discovery/conf/locale/en/LC_MESSAGES/django.mo
View file @
230d1c39
No preview for this file type
course_discovery/conf/locale/en/LC_MESSAGES/django.po
View file @
230d1c39
...
...
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-01 1
4:43
+0500\n"
"POT-Creation-Date: 2017-06-01 1
6:02
+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
...
...
@@ -683,6 +683,14 @@ msgid "Minimum effort cannot be greater than Maximum effort"
msgstr ""
#: apps/publisher/forms.py
msgid "Enter XSeries program name"
msgstr ""
#: apps/publisher/forms.py
msgid "Enter Micromasters program name"
msgstr ""
#: apps/publisher/forms.py
msgid "Only audit seat can be without price."
msgstr ""
...
...
course_discovery/conf/locale/en/LC_MESSAGES/djangojs.mo
View file @
230d1c39
No preview for this file type
course_discovery/conf/locale/en/LC_MESSAGES/djangojs.po
View file @
230d1c39
...
...
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-01 1
4:43
+0500\n"
"POT-Creation-Date: 2017-06-01 1
6:02
+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
...
...
course_discovery/conf/locale/eo/LC_MESSAGES/django.mo
View file @
230d1c39
No preview for this file type
course_discovery/conf/locale/eo/LC_MESSAGES/django.po
View file @
230d1c39
...
...
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-01 1
4:43
+0500\n"
"POT-Creation-Date: 2017-06-01 1
6:02
+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
...
...
@@ -812,6 +812,14 @@ msgstr ""
"αмєт, ¢σηѕє¢тєтυя α#"
#: apps/publisher/forms.py
msgid "Enter XSeries program name"
msgstr "Éntér XSérïés prögräm nämé Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕ#"
#: apps/publisher/forms.py
msgid "Enter Micromasters program name"
msgstr "Éntér Mïçrömästérs prögräm nämé Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢т#"
#: apps/publisher/forms.py
msgid "Only audit seat can be without price."
msgstr ""
"Önlý äüdït séät çän ßé wïthöüt prïçé. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, "
...
...
course_discovery/conf/locale/eo/LC_MESSAGES/djangojs.mo
View file @
230d1c39
No preview for this file type
course_discovery/conf/locale/eo/LC_MESSAGES/djangojs.po
View file @
230d1c39
...
...
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-01 1
4:43
+0500\n"
"POT-Creation-Date: 2017-06-01 1
6:02
+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
...
...
course_discovery/templates/publisher/course_run/edit_run_form.html
View file @
230d1c39
...
...
@@ -129,9 +129,9 @@
{{ run_form.micromasters_name }}
</div>
{% if run_form.micromasters_name.errors %}
<div
class=
"field-message
has
-error"
>
<span
class=
"field-message-content"
>
{{ run_form.micromasters_name.errors|escape }}
<div
class=
"field-message-error"
>
<span>
{{ run_form.micromasters_name.errors|escape }}
</span>
</div>
{% endif %}
...
...
@@ -146,7 +146,7 @@
{{ run_form.xseries_name}}
</div>
{% if run_form.xseries_name.errors %}
<div
class=
"field-messag
e has
-error"
>
<div
class=
"field-messag-error"
>
<span
class=
"field-message-content"
>
{{ run_form.xseries_name.errors|escape }}
</span>
...
...
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