Unverified Commit c8d0d5eb by Anthony Mangano Committed by GitHub

Merge pull request #16938 from edx/LEARNER-3633-fix-entitlement-unenrollment-modal-a11y-issues

LEARNER-3633 fix entitlement unenrollment modal a11y issues
parents ff1ff6e1 fdadd4cd
...@@ -188,7 +188,6 @@ ...@@ -188,7 +188,6 @@
$('#unenroll_form input[type="submit"]').prop('disabled', true); $('#unenroll_form input[type="submit"]').prop('disabled', true);
}); });
edx.dashboard.dropdown.toggleCourseActionsDropdownMenu(event);
$('#unenroll-modal').css('position', 'fixed'); $('#unenroll-modal').css('position', 'fixed');
}); });
......
...@@ -52,11 +52,7 @@ ...@@ -52,11 +52,7 @@
this.resetModal(); this.resetModal();
this.setHeaderText(courseName, courseNumber); this.setHeaderText(courseName, courseNumber);
this.setSubmitData(apiEndpoint); this.setSubmitData(apiEndpoint);
this.$el.css('position', 'fixed');
if (window.edx && window.edx.dashboard && window.edx.dashboard.dropdown) {
window.edx.dashboard.dropdown.toggleCourseActionsDropdownMenu(event);
this.$el.css('position', 'fixed');
}
}, },
handleSubmit: function() { handleSubmit: function() {
......
...@@ -86,14 +86,6 @@ ...@@ -86,14 +86,6 @@
$(modal_id).show().fadeTo(200, 1); $(modal_id).show().fadeTo(200, 1);
$(modal_id).find('.notice').hide().html(''); $(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); window.scrollTo(0, 0);
e.preventDefault(); e.preventDefault();
}); });
......
...@@ -61,9 +61,13 @@ from student.models import CourseEnrollment ...@@ -61,9 +61,13 @@ from student.models import CourseEnrollment
}); });
</%static:require_module> </%static:require_module>
<%static:require_module module_name="js/learner_dashboard/entitlement_unenrollment_factory" class_name="EntitlementUnenrollmentFactory"> <%static:require_module module_name="js/learner_dashboard/entitlement_unenrollment_factory" class_name="EntitlementUnenrollmentFactory">
EntitlementUnenrollmentFactory({ ## Wait until the document is fully loaded before initializing the EntitlementUnenrollmentView
dashboardPath: "${reverse('dashboard') | n, js_escaped_string}", ## to ensure events are setup correctly.
signInPath: "${reverse('signin_user') | n, js_escaped_string}" $(document).ready(function() {
EntitlementUnenrollmentFactory({
dashboardPath: "${reverse('dashboard') | n, js_escaped_string}",
signInPath: "${reverse('signin_user') | n, js_escaped_string}"
});
}); });
</%static:require_module> </%static:require_module>
% if settings.FEATURES.get('ENABLE_DASHBOARD_SEARCH'): % if settings.FEATURES.get('ENABLE_DASHBOARD_SEARCH'):
......
...@@ -63,9 +63,13 @@ from student.models import CourseEnrollment ...@@ -63,9 +63,13 @@ from student.models import CourseEnrollment
}); });
</%static:require_module> </%static:require_module>
<%static:require_module module_name="js/learner_dashboard/entitlement_unenrollment_factory" class_name="EntitlementUnenrollmentFactory"> <%static:require_module module_name="js/learner_dashboard/entitlement_unenrollment_factory" class_name="EntitlementUnenrollmentFactory">
EntitlementUnenrollmentFactory({ ## Wait until the document is fully loaded before initializing the EntitlementUnenrollmentView
dashboardPath: "${reverse('dashboard') | n, js_escaped_string}", ## to ensure events are setup correctly.
signInPath: "${reverse('signin_user') | n, js_escaped_string}" $(document).ready(function() {
EntitlementUnenrollmentFactory({
dashboardPath: "${reverse('dashboard') | n, js_escaped_string}",
signInPath: "${reverse('signin_user') | n, js_escaped_string}"
});
}); });
</%static:require_module> </%static:require_module>
% if settings.FEATURES.get('ENABLE_DASHBOARD_SEARCH'): % 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