File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -88,9 +88,13 @@ var fm_renumber = function( $wrappers ) {
8888 $ ( this ) . attr ( 'name' , new_fname ) ;
8989 if ( $ ( this ) . attr ( 'id' ) && $ ( this ) . attr ( 'id' ) . match ( '-proto' ) && ! new_fname . match ( 'proto' ) ) {
9090 $ ( this ) . attr ( 'id' , 'fm-edit-dynamic-' + dynamic_seq ) ;
91- var parent = $ ( this ) . closest ( '.fm-item' ) ;
92- if ( parent . find ( '.fm-label label' ) . length ) {
93- parent . find ( '.fm-label label' ) . attr ( 'for' , 'fm-edit-dynamic-' + dynamic_seq ) ;
91+ if ( $ ( this ) . parent ( ) . hasClass ( 'fm-option' ) ) {
92+ $ ( this ) . parent ( ) . find ( 'label' ) . attr ( 'for' , 'fm-edit-dynamic-' + dynamic_seq ) ;
93+ } else {
94+ var parent = $ ( this ) . closest ( '.fm-item' ) ;
95+ if ( parent . length && parent . find ( '.fm-label label' ) . length ) {
96+ parent . find ( '.fm-label label' ) . attr ( 'for' , 'fm-edit-dynamic-' + dynamic_seq ) ;
97+ }
9498 }
9599 dynamic_seq ++ ;
96100 return ; // continue;
You can’t perform that action at this time.
0 commit comments