Skip to content

Commit f7e4331

Browse files
committed
Merge remote-tracking branch 'trigger/AC-1429-with-24-develop' into AC-1390
2 parents bb77970 + 8415d0a commit f7e4331

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

lib/web/mage/backend/tabs.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,22 @@ define([
239239
// Extension for mage.tabs - Ajax functionality for tabs
240240
$.widget('mage.tabs', $.mage.tabs, {
241241
options: {
242-
ajaxOptions: {
243-
data: {
244-
isAjax: true,
245-
'form_key': typeof FORM_KEY !== 'undefined' ? FORM_KEY : null
246-
}
242+
/**
243+
* Add form key to ajax call
244+
* @param {Object} event - event object
245+
* @param {Object} ui
246+
*/
247+
beforeLoad: function (event, ui) {
248+
ui.ajaxSettings.type = 'POST';
249+
ui.ajaxSettings.hasContent = true;
250+
ui.jqXHR.setRequestHeader('Content-Type', ui.ajaxSettings.contentType);
251+
ui.ajaxSettings.data = jQuery.param(
252+
{
253+
isAjax: true,
254+
'form_key': typeof FORM_KEY !== 'undefined' ? FORM_KEY : null
255+
},
256+
ui.ajaxSettings.traditional
257+
);
247258
},
248259

249260
/**

0 commit comments

Comments
 (0)