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;
background-color: #fff;
display: inline-block;
&[disabled] {
color: #aaa;
}
}
}

View File

@ -163,18 +163,14 @@ jQuery( function( $ ) {
$( this ).closest( '.wc-wizard-service-settings' )
.find( 'input.payment-email-input' )
.attr( 'type', 'email' )
.prop( 'disabled', false )
.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 {
$( this ).closest( '.wc-wizard-service-settings' )
.find( 'input.payment-email-input' )
.attr( 'type', null )
.prop( 'disabled', true )
.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();