mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°5890 - Use leave handler in backoffice forms to better handle leave confirmation message with multiple forms in a single page
This commit is contained in:
@@ -79,4 +79,12 @@ $(document).ready(function () {
|
||||
let oDialogElem = $(this).dialog('instance').uiDialog;
|
||||
oDialogElem.next('.ui-widget-overlay').css('z-index', oDialogElem.css('z-index') - 1);
|
||||
} );
|
||||
|
||||
// Initialize leave handler when a form with touched fields is about to be closed
|
||||
$('body').leave_handler({
|
||||
'message': Dict.S('UI:NavigateAwayConfirmationMessage'),
|
||||
'extra_events': {
|
||||
'body': ['dialogbeforeclose'] // jQueryUI dialog
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user