Merge pull request #1963 from edx/feature/gprice/drupal-iframe-breakout
Make register button for marketing site break out of iframe
This commit is contained in:
@@ -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.')
|
||||
|
||||
Reference in New Issue
Block a user