Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alanthai committed Feb 28, 2024
1 parent 9d16b99 commit 17c2445
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ exports.setupListeners = async function () {
});

Bolt.on('login_modal_closed', () => {
console.log('login modal closed');
var disabledAttr = $('.submit-customer').prop('disabled');
if (disabledAttr) {
$('.submit-customer').removeAttr('disabled');
Expand All @@ -212,7 +211,6 @@ exports.setupListeners = async function () {

Bolt.on('auto_account_check_complete', response => {
const $accountCheckbox = $('#acct-checkbox');
console.log('aaaa account check complete', response);
if (response.result instanceof Error) {
if (response.result.message === 'Invalid email') {
$('.submit-customer').attr('disabled', 'true');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $(document).ready(async function () {
$('.submit-customer').attr('disabled', 'true');

// mount on the div container otherwise the iframe won't render
const emailField = document.querySelector(window.BoltSelectors.checkoutEmailField).parentElement;
const emailField = document.querySelector(window.BoltSelectors.checkoutEmailField);

if (emailField == null) {
return;
Expand All @@ -17,9 +17,7 @@ $(document).ready(async function () {

const loginModalComponent = Bolt.getComponent('login_modal') || Bolt.create('login_modal');

if (emailField != null) {
loginModalComponent.attach(emailField);
}
loginModalComponent.attach(emailField.parentElement);

const isBoltShopperLoggedIn = $('.bolt-is-shopper-logged-in').val() === 'true';
const boltSFCCSessionLogoutCookie = account.getCookie('bolt_sfcc_session_logout');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@

<script>
window.BoltSelectors = {
// Sign In page
signInEmailField: "#login-form-email",
registerEmailField: "#registration-form-email",
forgetPasswordButton: "#password-reset",

// Registration page
registerEmailField: "#registration-form-email",

// Checkout page
checkoutEmailField: "#email-guest",
checkoutEmailSummary: ".customer-summary-email",

editShippingHeader: ".shipping-section h2",
shippingSummary: ".address-summary",

editPaymentHeader: ".payment-form h2",
paymentSummary: ".payment-details",
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
var assets = require('*/cartridge/scripts/assets.js');
assets.addCss('/css/login.css');
assets.addJs('/js/login.js');
assets.addJs('/js/signIn.js');
</isscript>

<div class="hero slant-down login-banner">
Expand Down

0 comments on commit 17c2445

Please sign in to comment.