File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -239,11 +239,22 @@ define([
239
239
// Extension for mage.tabs - Ajax functionality for tabs
240
240
$ . widget ( 'mage.tabs' , $ . mage . tabs , {
241
241
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
+ ) ;
247
258
} ,
248
259
249
260
/**
You can’t perform that action at this time.
0 commit comments