Commit fdadd4cd by Anthony Mangano

Fix a11y issues with unenroll modal

parent ca46bfcf
......@@ -188,7 +188,6 @@
$('#unenroll_form input[type="submit"]').prop('disabled', true);
});
edx.dashboard.dropdown.toggleCourseActionsDropdownMenu(event);
$('#unenroll-modal').css('position', 'fixed');
});
......
......@@ -52,11 +52,7 @@
this.resetModal();
this.setHeaderText(courseName, courseNumber);
this.setSubmitData(apiEndpoint);
if (window.edx && window.edx.dashboard && window.edx.dashboard.dropdown) {
window.edx.dashboard.dropdown.toggleCourseActionsDropdownMenu(event);
this.$el.css('position', 'fixed');
}
this.$el.css('position', 'fixed');
},
handleSubmit: function() {
......
......@@ -86,14 +86,6 @@
$(modal_id).show().fadeTo(200, 1);
$(modal_id).find('.notice').hide().html('');
var notice = $(this).data('notice');
if (notice !== undefined) {
$notice = $(modal_id).find('.notice');
$notice.show().html(notice);
// This is for activating leanModal links that were in the notice. We should have a cleaner way of
// allowing all dynamically added leanmodal links to work.
$notice.find('a[rel*=leanModal]').leanModal({top: 120, overlay: 1, closeButton: '.close-modal', position: 'absolute'});
}
window.scrollTo(0, 0);
e.preventDefault();
});
......
......@@ -61,9 +61,13 @@ from student.models import CourseEnrollment
});
</%static:require_module>
<%static:require_module module_name="js/learner_dashboard/entitlement_unenrollment_factory" class_name="EntitlementUnenrollmentFactory">
EntitlementUnenrollmentFactory({
dashboardPath: "${reverse('dashboard') | n, js_escaped_string}",
signInPath: "${reverse('signin_user') | n, js_escaped_string}"
## Wait until the document is fully loaded before initializing the EntitlementUnenrollmentView
## to ensure events are setup correctly.
$(document).ready(function() {
EntitlementUnenrollmentFactory({
dashboardPath: "${reverse('dashboard') | n, js_escaped_string}",
signInPath: "${reverse('signin_user') | n, js_escaped_string}"
});
});
</%static:require_module>
% if settings.FEATURES.get('ENABLE_DASHBOARD_SEARCH'):
......
......@@ -63,9 +63,13 @@ from student.models import CourseEnrollment
});
</%static:require_module>
<%static:require_module module_name="js/learner_dashboard/entitlement_unenrollment_factory" class_name="EntitlementUnenrollmentFactory">
EntitlementUnenrollmentFactory({
dashboardPath: "${reverse('dashboard') | n, js_escaped_string}",
signInPath: "${reverse('signin_user') | n, js_escaped_string}"
## Wait until the document is fully loaded before initializing the EntitlementUnenrollmentView
## to ensure events are setup correctly.
$(document).ready(function() {
EntitlementUnenrollmentFactory({
dashboardPath: "${reverse('dashboard') | n, js_escaped_string}",
signInPath: "${reverse('signin_user') | n, js_escaped_string}"
});
});
</%static:require_module>
% if settings.FEATURES.get('ENABLE_DASHBOARD_SEARCH'):
......
Markdown is supported
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