OBW: Disable (not hide) payment email input when opted-out

This commit is contained in:
Paul Dechov 2018-09-20 16:48:43 -04:00
parent 0566708744
commit 5eea29eb31
2 changed files with 6 additions and 6 deletions

View File

@ -1060,6 +1060,10 @@ h3.jetpack-reasons {
color: #444; color: #444;
background-color: #fff; background-color: #fff;
display: inline-block; display: inline-block;
&[disabled] {
color: #aaa;
}
} }
} }

View File

@ -163,18 +163,14 @@ jQuery( function( $ ) {
$( this ).closest( '.wc-wizard-service-settings' ) $( this ).closest( '.wc-wizard-service-settings' )
.find( 'input.payment-email-input' ) .find( 'input.payment-email-input' )
.attr( 'type', 'email' ) .attr( 'type', 'email' )
.prop( 'disabled', false )
.prop( 'required', true ); .prop( 'required', true );
$( this ).closest( '.wc-wizard-service-settings' )
.find( '.wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_email' )
.show();
} else { } else {
$( this ).closest( '.wc-wizard-service-settings' ) $( this ).closest( '.wc-wizard-service-settings' )
.find( 'input.payment-email-input' ) .find( 'input.payment-email-input' )
.attr( 'type', null ) .attr( 'type', null )
.prop( 'disabled', true )
.prop( 'required', false ); .prop( 'required', false );
$( this ).closest( '.wc-wizard-service-settings' )
.find( '.wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_email' )
.hide();
} }
} ).find( 'input#stripe_create_account, input#ppec_paypal_reroute_requests' ).change(); } ).find( 'input#stripe_create_account, input#ppec_paypal_reroute_requests' ).change();