Allow setting self-paced on schedule & details page.

Currently unstyled.

ECOM-2462
This commit is contained in:
Peter Fogg
2015-10-08 13:39:59 -04:00
parent 0107525d41
commit 7f673604fb
5 changed files with 94 additions and 5 deletions

View File

@@ -99,6 +99,13 @@ var DetailsView = ValidatingView.extend({
}
this.$('#' + this.fieldToSelectorMap['entrance_exam_minimum_score_pct']).val(this.model.get('entrance_exam_minimum_score_pct'));
if (this.model.get('self_paced')) {
this.$('#course-pace-self-paced').attr('checked', true);
}
else {
this.$('#course-pace-instructor-led').attr('checked', true);
}
this.licenseView.render()
return this;
@@ -236,6 +243,11 @@ var DetailsView = ValidatingView.extend({
}
}, this), 1000);
break;
case 'course-pace-self-paced':
// Fallthrough to handle both radio buttons
case 'course-pace-instructor-led':
this.model.set('self_paced', JSON.parse(event.currentTarget.value));
break;
default: // Everything else is handled by datepickers and CodeMirror.
break;
}