This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/static/admin/js/cancel.js

14 lines
410 B
JavaScript
Raw Normal View History

(function($) {
'use strict';
$(function() {
$('.cancel-link').on('click', function(e) {
e.preventDefault();
if (window.location.search.indexOf('&_popup=1') === -1) {
window.history.back(); // Go back if not a popup.
} else {
window.close(); // Otherwise, close the popup.
}
});
});
})(django.jQuery);