Skip to content

Commit

Permalink
Fix/crm/js issue welcome wizard - WIP (#41437)
Browse files Browse the repository at this point in the history
* wizard fix

* Changelog

* remove zbsOptions from export
  • Loading branch information
mikestottuk authored Jan 30, 2025
1 parent 4a22564 commit 49d186c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Small fix to welcome wizard
41 changes: 19 additions & 22 deletions projects/plugins/crm/js/welcome-to-zbs/wizard2.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ jQuery( function () {
if ( isValid ) {
nextStepWizard.prop( 'disabled', false ).trigger( 'click' );
}
//console.log(window.zbsOptions);
} );
jQuery( 'div.setup-panel div a.btn-primary' ).trigger( 'click' );
jQuery( '.zbs-gogogo' )
Expand All @@ -83,7 +82,7 @@ jQuery( function () {
}
jQuery( this ).addClass( 'disabled' );

const t = window.zbsOptions;
const t = zbsOptions;
t.action = 'zbs_wizard_fin';
t.security = jQuery( '#zbswf-ajax-nonce' ).val();
/*
Expand Down Expand Up @@ -201,27 +200,25 @@ function zbs_crm_js_updatePage2() {
}
}
function zbsJS_welcomeWizard_update_deets() {
window.zbsOptions.zbs_crm_name = jQuery( '#zbs_crm_name' ).val();
window.zbsOptions.zbs_crm_other = jQuery( '#zbs_other_details' ).val();
window.zbsOptions.zbs_crm_curr = jQuery( '#zbs_crm_curr' ).val();
window.zbsOptions.zbs_crm_menu_style = jQuery(
'input[name="zbs-menu-opt-choice"]:checked'
).val();
window.zbsOptions.zbs_b2b = jQuery( '#zbs_b2b' ).is( ':checked' ) ? 1 : 0;
window.zbsOptions.zbs_crm_share_essentials = jQuery( '#zbs_ess' ).is( ':checked' ) ? 1 : 0;

window.zbsOptions.zbs_quotes = jQuery( '#zbs_quotes' ).is( ':checked' ) ? 1 : 0;
window.zbsOptions.zbs_invoicing = jQuery( '#zbs_invoicing' ).is( ':checked' ) ? 1 : 0;
window.zbsOptions.jpcrm_woo_module = jQuery( '#jpcrm_woo_module' ).is( ':checked' ) ? 1 : 0;
window.zbsOptions.zbs_forms = 1;

window.zbsOptions.zbs_crm_subblogname = jQuery( '#zbs_crm_subblogname' ).val();
window.zbsOptions.zbs_crm_first_name = jQuery( '#zbs_crm_first_name' ).val();
window.zbsOptions.zbs_crm_last_name = jQuery( '#zbs_crm_last_name' ).val();
window.zbsOptions.zbs_crm_email = jQuery( '#zbs_crm_email' ).val();
window.zbsOptions.zbs_crm_subscribed = jQuery( '#zbs_sub' ).is( ':checked' ) ? 1 : 0;
zbsOptions.zbs_crm_name = jQuery( '#zbs_crm_name' ).val();
zbsOptions.zbs_crm_other = jQuery( '#zbs_other_details' ).val();
zbsOptions.zbs_crm_curr = jQuery( '#zbs_crm_curr' ).val();
zbsOptions.zbs_crm_menu_style = jQuery( 'input[name="zbs-menu-opt-choice"]:checked' ).val();
zbsOptions.zbs_b2b = jQuery( '#zbs_b2b' ).is( ':checked' ) ? 1 : 0;
zbsOptions.zbs_crm_share_essentials = jQuery( '#zbs_ess' ).is( ':checked' ) ? 1 : 0;

zbsOptions.zbs_quotes = jQuery( '#zbs_quotes' ).is( ':checked' ) ? 1 : 0;
zbsOptions.zbs_invoicing = jQuery( '#zbs_invoicing' ).is( ':checked' ) ? 1 : 0;
zbsOptions.jpcrm_woo_module = jQuery( '#jpcrm_woo_module' ).is( ':checked' ) ? 1 : 0;
zbsOptions.zbs_forms = 1;

zbsOptions.zbs_crm_subblogname = jQuery( '#zbs_crm_subblogname' ).val();
zbsOptions.zbs_crm_first_name = jQuery( '#zbs_crm_first_name' ).val();
zbsOptions.zbs_crm_last_name = jQuery( '#zbs_crm_last_name' ).val();
zbsOptions.zbs_crm_email = jQuery( '#zbs_crm_email' ).val();
zbsOptions.zbs_crm_subscribed = jQuery( '#zbs_sub' ).is( ':checked' ) ? 1 : 0;
}

if ( typeof module !== 'undefined' ) {
module.exports = { zbsOptions, zbs_biz_select, zbs_crm_name_change, zbs_crm_js_updatePage2 };
module.exports = { zbs_biz_select, zbs_crm_name_change, zbs_crm_js_updatePage2 };
}

0 comments on commit 49d186c

Please sign in to comment.