File tree Expand file tree Collapse file tree 4 files changed +23
-15
lines changed
Backend/view/adminhtml/templates/widget/form
Catalog/Test/Mftf/Section Expand file tree Collapse file tree 4 files changed +23
-15
lines changed Original file line number Diff line number Diff line change 3232
3333require([
3434 'jquery',
35- 'mage/backend/form',
36- 'mage/backend/validation'
35+ 'mage/mage'
3736], function($){
3837
39- $('#edit_form').form()
40- .validation({
38+ $('#edit_form').mage('form').mage('validation', {
4139 validationUrl: ' {$ block ->escapeJs ($ block ->getValidationUrl ())}',
4240 highlight: function(element) {
4341 var detailsElement = $(element).closest('details');
@@ -49,8 +47,7 @@ require([
4947 }
5048 $(element).trigger('highlight.validate');
5149 }
52- });
53-
50+ });
5451});
5552
5653script ;
Original file line number Diff line number Diff line change 99<sections xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
1010 xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Page/etc/SectionObject.xsd" >
1111 <section name =" StorefrontCategoryFilterSection" >
12- <element name =" CategoryFilter" type =" button" selector =" //main//div[@class= 'filter-options']//div[contains(text(), 'Category')]" />
12+ <element name =" CategoryFilter" type =" button" selector =" //main//div[contains( @class, 'filter-options') ]//div[contains(text(), 'Category')]" />
1313 <element name =" CategoryByName" type =" button" selector =" //main//div[@class='filter-options']//li[@class='item']//a[contains(text(), '{{var1}}')]" parameterized =" true" />
1414 </section >
1515</sections >
Original file line number Diff line number Diff line change 99<sections xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
1010 xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Page/etc/SectionObject.xsd" >
1111 <section name =" AdminOrderCommentsTabSection" >
12- <element name =" orderNotesList" type =" text" selector =" #Order_History .edit-order-comments .note-list" />
13- <element name =" orderComments" type =" text" selector =" #Order_History .edit-order-comments-block" />
14- <element name =" orderComment" type =" text" selector =" #Order_History .comments-block-item-comment" />
12+ <element name =" orderNotesList" type =" text" selector =" div[aria-labelledby='sales_order_view_tabs_order_history'] .edit-order-comments .note-list" />
13+ <element name =" orderComments" type =" text" selector =" div[aria-labelledby='sales_order_view_tabs_order_history'] .edit-order-comments-block" />
14+ <element name =" orderComment" type =" text" selector =" div[aria-labelledby='sales_order_view_tabs_order_history'] .comments-block-item-comment" />
1515 </section >
1616</sections >
Original file line number Diff line number Diff 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 /**
You can’t perform that action at this time.
0 commit comments