File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
app/code/Magento/Sales/view/adminhtml/web/order/create Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 246246 * @param {Event } event
247247 */
248248 changeAddressField : function ( event ) {
249+ console . trace ( ) ;
249250 var field = Event . element ( event ) ,
250251 re = / [ ^ \[ ] * \[ ( [ ^ \] ] * ) _ a d d r e s s \] \[ ( [ ^ \] ] * ) \] ( \[ ( \d ) \] ) ? / ,
251252 matchRes = field . name . match ( re ) ,
326327
327328 if ( this . isBillingField ( fieldName ) ) {
328329 syncName = fieldName . replace ( 'billing' , 'shipping' ) ;
330+
331+ if ( fieldName . indexOf ( 'country' ) ) {
332+ jQuery ( '#order-shipping_address_region' ) . css (
333+ 'display' ,
334+ jQuery ( '#order-billing_address_region' ) . css ( 'display' )
335+ ) ;
336+ jQuery ( '#order-shipping_address_region_id' ) . css (
337+ 'display' ,
338+ jQuery ( '#order-billing_address_region_id' ) . css ( 'display' )
339+ ) ;
340+ }
329341 }
330342
331343 $ ( container ) . select ( '[name="' + syncName + '"]' ) . each ( function ( element ) {
332344 if ( ~ [ 'input' , 'textarea' , 'select' ] . indexOf ( element . tagName . toLowerCase ( ) ) ) {
333345 if ( element . type === "checkbox" ) {
334346 element . checked = fieldValue . checked ;
347+ } else if ( element . type === "select" || element . type === "select-one" ) {
348+ element . innerHTML = fieldValue . innerHTML ;
349+ element . value = fieldValue . value ;
335350 } else {
336351 element . value = fieldValue . value ;
337352 }
You can’t perform that action at this time.
0 commit comments