OBW: Avoid form breaking due to email validation on hidden field

This commit is contained in:
Paul Dechov 2018-08-31 11:36:41 -04:00
parent dc55b9b002
commit a486f50cfd
1 changed files with 2 additions and 0 deletions

View File

@ -162,6 +162,7 @@ jQuery( function( $ ) {
if ( $( this ).is( ':checked' ) ) {
$( this ).closest( '.wc-wizard-service-settings' )
.find( 'input.payment-email-input' )
.attr( 'type', 'email' )
.prop( 'required', true );
$( this ).closest( '.wc-wizard-service-settings' )
.find( '.wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_email' )
@ -169,6 +170,7 @@ jQuery( function( $ ) {
} else {
$( this ).closest( '.wc-wizard-service-settings' )
.find( 'input.payment-email-input' )
.attr( 'type', null )
.prop( 'required', false );
$( this ).closest( '.wc-wizard-service-settings' )
.find( '.wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_email' )