Skip to content
Snippets Groups Projects
Commit 2cf88813 authored by Waheed Ahmed's avatar Waheed Ahmed
Browse files

Fix course enroll button on program details.

If there is no dropdown for a course but there is another course in program
which have a dropdown, $('.run-select').val() returns that run's value. Fixed
by using $el.

PROD-1217
parent 4799f40d
Branches
Tags release-2020-01-29-05.11
No related merge requests found
......@@ -48,7 +48,7 @@ class CourseEnrollView extends Backbone.View {
handleEnroll() {
// Enrollment click event handled here
if (this.model.get('is_mobile_only') !== true) {
const courseRunKey = $('.run-select').val() || this.model.get('course_run_key');
const courseRunKey = this.$el.find('.run-select').val() || this.model.get('course_run_key');
this.model.updateCourseRun(courseRunKey);
if (this.model.get('is_enrolled')) {
// Create the enrollment.
......
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