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):
self.assertContains(response, "Enrollment End Date")
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")
def test_regular_site_fetch(self):
......@@ -154,6 +157,9 @@ class CourseDetailsTestCase(CourseTestCase):
self.assertNotContains(response, "not the dates shown on your course summary page")
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")
......
......@@ -184,8 +184,16 @@ CMS.Views.Settings.Details = CMS.Views.ValidatingView.extend({
if (forcedTarget) {
thisTarget = forcedTarget;
thisTarget.id = $(thisTarget).attr('id');
} else {
} else if (e !== null) {
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]) {
......
......@@ -193,14 +193,13 @@ from contentstore import utils
% endif
</section>
<hr class="divide" />
% if about_page_editable:
<section class="group-settings marketing">
<header>
<h2 class="title-2">${_("Introducing Your Course")}</h2>
<span class="tip">${_("Information for prospective students")}</span>
</header>
<ol class="list-input">
% if about_page_editable:
<li class="field text" id="field-course-overview">
<label for="course-overview">${_("Course Overview")}</label>
<textarea class="tinymce text-editor" id="course-overview"></textarea>
......@@ -212,6 +211,7 @@ from contentstore import utils
%>${text}</%def>
<span class="tip tip-stacked">${overview_text()}</span>
</li>
% endif
<li class="field image" id="field-course-image">
<label>${_("Course Image")}</label>
......@@ -241,6 +241,7 @@ from contentstore import utils
</div>
</li>
% if about_page_editable:
<li class="field video" id="field-course-introduction-video">
<label for="course-overview">${_("Course Introduction Video")}</label>
<div class="input input-existing">
......@@ -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>
</div>
</li>
% endif
</ol>
</section>
% if about_page_editable:
<hr class="divide" />
<section class="group-settings requirements">
......@@ -276,7 +279,7 @@ from contentstore import utils
</li>
</ol>
</section>
% endif
% endif
</form>
</article>
<aside class="content-supplementary" role="complimentary">
......
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