Skip to content

Commit

Permalink
fix(Registration): Customer can not register non focuasable js issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbir1991 committed Apr 10, 2018
1 parent 127ef9f commit 8acaebb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions assets/js/vendor-registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ var Dokan_Vendor_Registration = {
var value = $(this).val();

if ( value === 'seller') {
$('.show_if_seller').find( 'input, select' ).removeAttr( 'disabled' );
$('.show_if_seller').slideDown();

if ( $( '.tc_check_box' ).length > 0 ) {
$('button[name=register]').attr('disabled','disabled');
}

} else {
$('.show_if_seller').find( 'input, select' ).attr( 'disabled', 'disabled' );
$('.show_if_seller').slideUp();

if ( $( '.tc_check_box' ).length > 0 ) {
Expand Down Expand Up @@ -165,6 +167,8 @@ var Dokan_Vendor_Registration = {
$(function() {
Dokan_Vendor_Registration.init();

$('.show_if_seller').find( 'input, select' ).attr( 'disabled', 'disabled' );

// disable migration button if checkbox isn't checked
if ( $( '.tc_check_box' ).length > 0 ){
$( 'input[name=dokan_migration]' ).attr( 'disabled', 'disabled' );
Expand Down

0 comments on commit 8acaebb

Please sign in to comment.