Connect new button to mode selection

This commit is contained in:
David Ormsbee
2013-08-22 17:50:50 -04:00
parent 52d33c0dee
commit 478fc376f7

View File

@@ -27,7 +27,12 @@
$('#class_enroll_form').on('ajax:complete', function(event, xhr) {
if(xhr.status == 200) {
window.top.location.href = "${reverse('dashboard')}";
if (xhr.responseText != "") {
window.top.location.href = xhr.responseText;
}
else {
window.top.location.href = "${reverse('dashboard')}";
}
} else if (xhr.status == 403) {
window.top.location.href = "${reverse('register_user')}?course_id=${course.id}&enrollment_action=enroll";
} else {