From ef27b8f787078633a5f459003a578629881e29c7 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Tue, 7 May 2013 12:41:33 -0400 Subject: [PATCH] Make register button for marketing site break out of iframe Use window.top.location.href instead of location.href for redirection. --- lms/templates/courseware/mktg_course_about.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/templates/courseware/mktg_course_about.html b/lms/templates/courseware/mktg_course_about.html index 2dbea82b11..e3cb864b99 100644 --- a/lms/templates/courseware/mktg_course_about.html +++ b/lms/templates/courseware/mktg_course_about.html @@ -26,9 +26,9 @@ $('#class_enroll_form').on('ajax:complete', function(event, xhr) { if(xhr.status == 200) { - location.href = "${reverse('dashboard')}"; + window.top.location.href = "${reverse('dashboard')}"; } else if (xhr.status == 403) { - location.href = "${reverse('register_user')}?course_id=${course.id}&enrollment_action=enroll"; + window.top.location.href = "${reverse('register_user')}?course_id=${course.id}&enrollment_action=enroll"; } else { $('#register_error').html( (xhr.responseText ? xhr.responseText : 'An error occurred. Please try again later.')