Handle the case where a modal errors a lot better

This commit is contained in:
bwilliams committed 2023-11-03 14:50:32 +00:00
1 parent 9738b133d2
commit 75c31f0506
2 files changed
+18 -1

No files matched your search

@@ -0,0 +1,16 @@
/**
* Default handling of UF modal error
*
* This script depends on uf-modal.js
*
* Target page: *
*/
$(document).ready(function() {
const handleModalError = function() {
$(this).ufModal('destroy');
$('body').on('renderError.ufModal', handleModalError);
}
$('body').on('renderError.ufModal', handleModalError);
});