mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°4352 - Fix unlock message
This commit is contained in:
@@ -112,13 +112,14 @@ function OnUnload(sTransactionId, sObjClass, iObjKey, sToken)
|
||||
if (!window.bInSubmit)
|
||||
{
|
||||
// If it's not a submit, then it's a "cancel" (Pressing the Cancel button, closing the window, using the back button...)
|
||||
// IMPORTANT: the ajax request MUST BE synchronous to be executed in this context
|
||||
$.ajax({
|
||||
url: GetAbsoluteUrlAppRoot()+'pages/ajax.render.php',
|
||||
async: false,
|
||||
method: 'POST',
|
||||
data: {operation: 'on_form_cancel', transaction_id: sTransactionId, obj_class: sObjClass, obj_key: iObjKey, token: sToken }
|
||||
});
|
||||
var sUrl = GetAbsoluteUrlAppRoot()+'pages/ajax.render.php';
|
||||
var oFormData = new FormData();
|
||||
oFormData.append('operation', 'on_form_cancel');
|
||||
oFormData.append('transaction_id', sTransactionId);
|
||||
oFormData.append('obj_class', sObjClass);
|
||||
oFormData.append('obj_key', iObjKey);
|
||||
oFormData.append('token', sToken);
|
||||
navigator.sendBeacon(sUrl, oFormData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user