Commit 9c6987d0 by chrisndodge

Merge pull request #873 from edx/fix/cdodge/enable-course-image-setting

also even when we have a marketing site, we still need a course image fo...
parents 499d272a 10b7c136
...@@ -128,7 +128,10 @@ class CourseDetailsTestCase(CourseTestCase): ...@@ -128,7 +128,10 @@ class CourseDetailsTestCase(CourseTestCase):
self.assertContains(response, "Enrollment End Date") self.assertContains(response, "Enrollment End Date")
self.assertContains(response, "not the dates shown on your course summary page") self.assertContains(response, "not the dates shown on your course summary page")
self.assertNotContains(response, "Introducing Your Course") self.assertContains(response, "Introducing Your Course")
self.assertContains(response, "Course Image")
self.assertNotContains(response,"Course Overview")
self.assertNotContains(response,"Course Introduction Video")
self.assertNotContains(response, "Requirements") self.assertNotContains(response, "Requirements")
def test_regular_site_fetch(self): def test_regular_site_fetch(self):
...@@ -154,6 +157,9 @@ class CourseDetailsTestCase(CourseTestCase): ...@@ -154,6 +157,9 @@ class CourseDetailsTestCase(CourseTestCase):
self.assertNotContains(response, "not the dates shown on your course summary page") self.assertNotContains(response, "not the dates shown on your course summary page")
self.assertContains(response, "Introducing Your Course") self.assertContains(response, "Introducing Your Course")
self.assertContains(response, "Course Image")
self.assertContains(response,"Course Overview")
self.assertContains(response,"Course Introduction Video")
self.assertContains(response, "Requirements") self.assertContains(response, "Requirements")
......
...@@ -184,8 +184,16 @@ CMS.Views.Settings.Details = CMS.Views.ValidatingView.extend({ ...@@ -184,8 +184,16 @@ CMS.Views.Settings.Details = CMS.Views.ValidatingView.extend({
if (forcedTarget) { if (forcedTarget) {
thisTarget = forcedTarget; thisTarget = forcedTarget;
thisTarget.id = $(thisTarget).attr('id'); thisTarget.id = $(thisTarget).attr('id');
} else { } else if (e !== null) {
thisTarget = e.currentTarget; thisTarget = e.currentTarget;
} else
{
// e and forcedTarget can be null so don't deference it
// This is because in cases where we have a marketing site
// we don't display the codeMirrors for editing the marketing
// materials, except we do need to show the 'set course image'
// workflow. So in this case e = forcedTarget = null.
return;
} }
if (!this.codeMirrors[thisTarget.id]) { if (!this.codeMirrors[thisTarget.id]) {
......
...@@ -193,14 +193,13 @@ from contentstore import utils ...@@ -193,14 +193,13 @@ from contentstore import utils
% endif % endif
</section> </section>
<hr class="divide" /> <hr class="divide" />
% if about_page_editable:
<section class="group-settings marketing"> <section class="group-settings marketing">
<header> <header>
<h2 class="title-2">${_("Introducing Your Course")}</h2> <h2 class="title-2">${_("Introducing Your Course")}</h2>
<span class="tip">${_("Information for prospective students")}</span> <span class="tip">${_("Information for prospective students")}</span>
</header> </header>
<ol class="list-input"> <ol class="list-input">
% if about_page_editable:
<li class="field text" id="field-course-overview"> <li class="field text" id="field-course-overview">
<label for="course-overview">${_("Course Overview")}</label> <label for="course-overview">${_("Course Overview")}</label>
<textarea class="tinymce text-editor" id="course-overview"></textarea> <textarea class="tinymce text-editor" id="course-overview"></textarea>
...@@ -212,6 +211,7 @@ from contentstore import utils ...@@ -212,6 +211,7 @@ from contentstore import utils
%>${text}</%def> %>${text}</%def>
<span class="tip tip-stacked">${overview_text()}</span> <span class="tip tip-stacked">${overview_text()}</span>
</li> </li>
% endif
<li class="field image" id="field-course-image"> <li class="field image" id="field-course-image">
<label>${_("Course Image")}</label> <label>${_("Course Image")}</label>
...@@ -241,6 +241,7 @@ from contentstore import utils ...@@ -241,6 +241,7 @@ from contentstore import utils
</div> </div>
</li> </li>
% if about_page_editable:
<li class="field video" id="field-course-introduction-video"> <li class="field video" id="field-course-introduction-video">
<label for="course-overview">${_("Course Introduction Video")}</label> <label for="course-overview">${_("Course Introduction Video")}</label>
<div class="input input-existing"> <div class="input input-existing">
...@@ -257,9 +258,11 @@ from contentstore import utils ...@@ -257,9 +258,11 @@ from contentstore import utils
<span class="tip tip-stacked">${_("Enter your YouTube video's ID (along with any restriction parameters)")}</span> <span class="tip tip-stacked">${_("Enter your YouTube video's ID (along with any restriction parameters)")}</span>
</div> </div>
</li> </li>
% endif
</ol> </ol>
</section> </section>
% if about_page_editable:
<hr class="divide" /> <hr class="divide" />
<section class="group-settings requirements"> <section class="group-settings requirements">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment