File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
app/code/Magento/Backend/view/adminhtml/web/js Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -47,18 +47,16 @@ define([
4747 _saveHandler : function ( form ) {
4848 var formData = { } ,
4949 requestData = { } ,
50+ counts = { } ,
5051 options = $ . data ( form , 'validator' ) . settings ;
5152
5253 if ( $ ( form ) . validation ( 'isValid' ) ) {
53- var counts = { } ;
5454 $ . each ( $ ( form ) . serializeArray ( ) , function ( ) {
55- var name = this . name ;
56- counts [ name ] = ( counts [ name ] || 0 ) + 1 ;
57- if ( formData [ name ] ) {
58- var replacement = '[' + ( counts [ name ] - 1 ) + ']' ;
59- name = name . replace ( new RegExp ( / \[ \] $ / g) , replacement ) ;
55+ counts [ this . name ] = ( counts [ this . name ] || 0 ) + 1 ;
56+ if ( formData [ this . name ] ) {
57+ this . name = this . name . replace ( new RegExp ( / \[ \] $ / g) , '[' + ( counts [ this . name ] - 1 ) + ']' ) ;
6058 }
61- formData [ name ] = this . value || '' ;
59+ formData [ this . name ] = this . value || '' ;
6260 } ) ;
6361
6462 requestData = {
You can’t perform that action at this time.
0 commit comments