wickes-css2 2.103.0-RG-1742-billie-30-60-90-days.1 → 2.103.0-RG-1742-billie-30-60-90-days.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/css/components/checkout-chip.css +1 -0
- package/build/css/components/checkout-payment-details-v2.css +1 -1
- package/build/css/components/checkout-payment-repayment-terms.css +1 -0
- package/build/css/components/energy-efficiency.css +1 -0
- package/build/css/components/global-search.css +1 -0
- package/build/css/components/kitchen/strip-stickers.css +1 -0
- package/build/css/components/legal-info.css +1 -0
- package/build/css/components/loader.css +1 -0
- package/build/css/components/long-banner.css +1 -0
- package/build/css/components/payment-details-BPS-form.css +1 -0
- package/build/css/components/pdf-loader.css +1 -0
- package/build/css/components/pdp-favourite-product.css +1 -0
- package/build/css/components/plp-favourite-product.css +1 -0
- package/build/css/components/price-block-v2-critical.css +1 -0
- package/build/css/components/price-block-v2.css +1 -0
- package/build/css/components/special-opening-schedule-v2.css +1 -0
- package/build/css/components/special-opening-schedule.css +1 -0
- package/build/css/components/store-locator-about.css +1 -0
- package/build/css/components/store-locator-facilities.css +1 -0
- package/build/css/components/store-locator-lookup.css +1 -0
- package/build/css/components/store-locator-v2-details.css +1 -0
- package/build/css/components/strip-stickers.css +1 -0
- package/build/css/components/tile-calculator.css +1 -0
- package/build/css/components/trade-pro-extras.css +1 -0
- package/build/css/main.css +1 -1
- package/build/css/pages/bicester-header.css +1 -0
- package/build/css/pages/bicester-project-list.css +1 -0
- package/build/css/pages/checkout-new.css +1 -0
- package/build/css/pages/checkout.css +1 -0
- package/build/css/pages/design-appointment.css +1 -0
- package/build/css/pages/home-movers.css +1 -0
- package/build/css/pages/iframe-paypage.css +1 -0
- package/build/css/pages/my-account-v2.css +1 -0
- package/build/css/pages/my-account.css +1 -0
- package/build/css/pages/new-usp-bar.css +1 -0
- package/build/css/pages/oldweb_header.css +1 -0
- package/build/css/pages/page_account-deletion.css +1 -0
- package/build/css/pages/page_act-trade-pro.css +1 -0
- package/build/css/pages/page_address-book.css +1 -0
- package/build/css/pages/page_bathroom-trends.css +1 -0
- package/build/css/pages/page_book-consultant-thank-you-new.css +1 -0
- package/build/css/pages/page_change-password.css +1 -0
- package/build/css/pages/page_checkout-payment-details.css +1 -0
- package/build/css/pages/page_checkout_delivery-new.css +1 -0
- package/build/css/pages/page_cms_homepage.css +1 -0
- package/build/css/pages/page_contact-us.css +1 -0
- package/build/css/pages/page_content.css +1 -0
- package/build/css/pages/page_coshh.css +1 -0
- package/build/css/pages/page_default-store.css +1 -0
- package/build/css/pages/page_discount.css +1 -0
- package/build/css/pages/page_empty-basket.css +1 -0
- package/build/css/pages/page_favourite-list.css +1 -0
- package/build/css/pages/page_fdl-management.css +1 -0
- package/build/css/pages/page_fdl-product.css +1 -0
- package/build/css/pages/page_fi.css +1 -0
- package/build/css/pages/page_forgotten-password.css +1 -0
- package/build/css/pages/page_half-login.css +1 -0
- package/build/css/pages/page_home.css +1 -0
- package/build/css/pages/page_hotspot-guttering.css +1 -0
- package/build/css/pages/page_in-store-checkout.css +1 -0
- package/build/css/pages/page_in-store_MVP_order-summary-submitted.css +1 -0
- package/build/css/pages/page_in-store_MVP_order-summary.css +1 -0
- package/build/css/pages/page_installation.css +1 -0
- package/build/css/pages/page_installer.css +1 -0
- package/build/css/pages/page_installer_form.css +1 -0
- package/build/css/pages/page_kitchen-claims.css +1 -0
- package/build/css/pages/page_kitchen-list.css +1 -0
- package/build/css/pages/page_login.css +1 -0
- package/build/css/pages/page_marketing-preferences.css +1 -0
- package/build/css/pages/page_merged-basket.css +1 -0
- package/build/css/pages/page_my-account_tradePro.css +1 -0
- package/build/css/pages/page_my-order.css +1 -0
- package/build/css/pages/page_my-orders.css +1 -0
- package/build/css/pages/page_new-checkout-forgot.css +1 -0
- package/build/css/pages/page_new-checkout_login-register.css +1 -0
- package/build/css/pages/page_no-results.css +1 -0
- package/build/css/pages/page_online-exclusive.css +1 -0
- package/build/css/pages/page_paint-mixing-error.css +1 -0
- package/build/css/pages/page_personal-details.css +1 -0
- package/build/css/pages/page_pre_home.css +1 -0
- package/build/css/pages/page_pre_home_thank-you.css +1 -0
- package/build/css/pages/page_product-details-critical.css +1 -0
- package/build/css/pages/page_product-details-v2-critical.css +1 -0
- package/build/css/pages/page_product-details-v2.css +1 -0
- package/build/css/pages/page_product-details.css +1 -0
- package/build/css/pages/page_product_search.css +1 -0
- package/build/css/pages/page_products-list-combined.css +1 -0
- package/build/css/pages/page_products-list-phone.css +1 -0
- package/build/css/pages/page_products-list.css +1 -0
- package/build/css/pages/page_products-list_v2.css +1 -0
- package/build/css/pages/page_projects.css +1 -0
- package/build/css/pages/page_quiz.css +1 -0
- package/build/css/pages/page_rate-review.css +1 -0
- package/build/css/pages/page_registration.css +1 -0
- package/build/css/pages/page_shopping-cart-v2.css +1 -0
- package/build/css/pages/page_shopping-cart.css +1 -0
- package/build/css/pages/page_split-orders.css +1 -0
- package/build/css/pages/page_store-locator-details.css +1 -0
- package/build/css/pages/page_store-locator.css +1 -0
- package/build/css/pages/page_thankyou.css +1 -0
- package/build/css/pages/page_ti.css +1 -0
- package/build/css/pages/page_tiling-calculator-generic.css +1 -0
- package/build/css/pages/page_top-rated.css +1 -0
- package/build/css/pages/page_track-my-order.css +1 -0
- package/build/css/pages/page_track_your_order.css +1 -0
- package/build/css/pages/page_trade_installer.css +1 -0
- package/build/css/pages/page_upd-pass.css +1 -0
- package/build/css/pages/page_wismo-details.css +1 -0
- package/build/css/pages/page_wismo-order-history.css +1 -0
- package/build/css/pages/page_wismo-orders.css +1 -0
- package/build/css/pages/print_quiz.css +1 -0
- package/build/css/pages/sticky_header.css +1 -0
- package/build/css/pages/tradePro-about.css +1 -0
- package/build/css/pages/tradePro-address-book.css +1 -0
- package/build/css/pages/tradePro-delivery-details.css +1 -0
- package/build/css/pages/tradePro-discount.css +1 -0
- package/build/css/pages/tradePro-order-history.css +1 -0
- package/build/css/pages/tradePro-payment-details.css +1 -0
- package/build/css/pages/tradePro-rewards-old.css +1 -0
- package/build/css/pages/tradePro-rewards.css +1 -0
- package/build/css/pages/tradePro-signup.css +1 -0
- package/build/css/pages/tradePro-thankyou-activate.css +1 -0
- package/build/js/emulation.min.js +145 -97
- package/build/js/page/checkout-payment-details.js +96 -43
- package/package.json +1 -1
- package/src/components/checkout-chip.hbs +15 -0
- package/src/components/checkout-payment-details-v2.hbs +35 -36
- package/src/components/checkout-payment-repayment-terms.hbs +3 -16
- package/src/data/data_billie-terms.json +7 -0
- package/src/js/emulation/checkout-payment-details.js +8 -8
- package/src/js/emulation/forms.js +99 -88
- package/src/js/emulation/paymentLoader.js +4 -3
- package/src/js/emulation/repayment-toggle.js +35 -0
- package/src/js/page/checkout-payment-details.js +96 -43
- package/src/scss/components/checkout-chip.scss +64 -0
- package/src/scss/components/checkout-payment-details-v2.scss +0 -1
- package/src/scss/components/checkout-payment-repayment-terms.scss +27 -91
- package/src/scss/main.scss +2 -0
|
@@ -3466,21 +3466,21 @@ Wick.DeliveryDetails = (function () {
|
|
|
3466
3466
|
|
|
3467
3467
|
var Wick = Wick || {};
|
|
3468
3468
|
|
|
3469
|
-
Wick.PaymentDetails = (function
|
|
3469
|
+
Wick.PaymentDetails = (function() {
|
|
3470
3470
|
var $btnEnterDetails = $('.btn-enter-details'),
|
|
3471
3471
|
$form = $btnEnterDetails.parents('form'),
|
|
3472
3472
|
isGuestPage = $('.page_checkout-payment-details_guest').length;
|
|
3473
3473
|
|
|
3474
|
-
function bindEvents
|
|
3475
|
-
$btnEnterDetails.on('click', function(){
|
|
3476
|
-
if ($form.find('#card-name').val()
|
|
3474
|
+
function bindEvents() {
|
|
3475
|
+
$btnEnterDetails.on('click', function() {
|
|
3476
|
+
if ($form.find('#card-name').val()?.length &&
|
|
3477
3477
|
$form.find('#first-line-address').val().length &&
|
|
3478
3478
|
$form.find('#address-line-1').val().length &&
|
|
3479
3479
|
$form.find('#town-city').val().length &&
|
|
3480
|
-
$form.find('#postcode_additional').val().length){
|
|
3480
|
+
$form.find('#postcode_additional').val().length) {
|
|
3481
3481
|
$('.checkout-payment-details__card-details').removeClass('checkout-payment-details__card-details_hidden');
|
|
3482
3482
|
$('html, body').animate({
|
|
3483
|
-
scrollTop: $('.checkout-payment-details__card-details').offset().top - 15
|
|
3483
|
+
scrollTop: $('.checkout-payment-details__card-details').offset().top - 15,
|
|
3484
3484
|
}, 700);
|
|
3485
3485
|
return false;
|
|
3486
3486
|
}
|
|
@@ -3488,14 +3488,14 @@ Wick.PaymentDetails = (function () {
|
|
|
3488
3488
|
return false;
|
|
3489
3489
|
});
|
|
3490
3490
|
|
|
3491
|
-
$('.checkout-payment-details__card-details').on('submit', function(){
|
|
3491
|
+
$('.checkout-payment-details__card-details').on('submit', function() {
|
|
3492
3492
|
var $form = $(this);
|
|
3493
3493
|
if ($form.find('#card-type').val() &&
|
|
3494
3494
|
$form.find('#card-name1').val().length &&
|
|
3495
3495
|
$form.find('#card-number').val().length &&
|
|
3496
3496
|
$form.find('#month').val() &&
|
|
3497
3497
|
$form.find('#year').val() &&
|
|
3498
|
-
$form.find('#security-code').val()){
|
|
3498
|
+
$form.find('#security-code').val()) {
|
|
3499
3499
|
window.location.href = isGuestPage
|
|
3500
3500
|
? './page_checkout_confirmation_guest.html'
|
|
3501
3501
|
: './page_checkout_confirmation.html';
|
|
@@ -3961,7 +3961,7 @@ Wick.FooterСurrentYear = (function () {
|
|
|
3961
3961
|
})();
|
|
3962
3962
|
|
|
3963
3963
|
var Wick = Wick || {};
|
|
3964
|
-
Wick.Forms = (function(){
|
|
3964
|
+
Wick.Forms = (function() {
|
|
3965
3965
|
var fieldRow = '.form-row[data-row-required]',
|
|
3966
3966
|
field = '.form-row__field',
|
|
3967
3967
|
fieldError = '.form-row__error',
|
|
@@ -3971,43 +3971,44 @@ Wick.Forms = (function(){
|
|
|
3971
3971
|
// validationError = '<div class="form-row__error">Error message here</div>',
|
|
3972
3972
|
$forgotPassword = $('.link-forgot-password'),
|
|
3973
3973
|
scenarios = [{
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
}
|
|
3974
|
+
condition: function() {
|
|
3975
|
+
// fill in the valid returning customer's details
|
|
3976
|
+
// Email: responsive@test.com; Password: 123456
|
|
3977
|
+
return $('#login-email').val() === 'responsive@test.com' && $('#password').val() === '123456';
|
|
3978
|
+
},
|
|
3979
|
+
action: function() {
|
|
3980
|
+
// redirected to the homepage
|
|
3981
|
+
Wick.User.login();
|
|
3982
|
+
window.location.href = './';
|
|
3984
3983
|
},
|
|
3984
|
+
},
|
|
3985
3985
|
{
|
|
3986
|
-
condition: function(){
|
|
3986
|
+
condition: function() {
|
|
3987
3987
|
// continue as a new user with "test+random@user.com"
|
|
3988
3988
|
return $('#registration-email').val().length;
|
|
3989
3989
|
// return $('#registration-email').val() === 'test+random@user.com';
|
|
3990
3990
|
},
|
|
3991
|
-
action: function(){
|
|
3991
|
+
action: function() {
|
|
3992
3992
|
// redirected to the register form
|
|
3993
3993
|
window.location.href = './page_registration.html';
|
|
3994
|
-
}
|
|
3994
|
+
},
|
|
3995
3995
|
},
|
|
3996
3996
|
{
|
|
3997
|
-
condition: function(){
|
|
3997
|
+
condition: function() {
|
|
3998
3998
|
// When I click forgotten password link
|
|
3999
3999
|
},
|
|
4000
|
-
action: function(){
|
|
4000
|
+
action: function() {
|
|
4001
4001
|
// redirected on the "Forgotten Password" page
|
|
4002
4002
|
window.location.href = './page_forgotten-password.html';
|
|
4003
|
-
}
|
|
4004
|
-
}
|
|
4005
|
-
]
|
|
4003
|
+
},
|
|
4004
|
+
},
|
|
4005
|
+
],
|
|
4006
4006
|
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4007
|
+
validationError = function(errorMsg) {
|
|
4008
|
+
return `<div class="form-row__error"> ${errorMsg || 'Error message here'}</div>`;
|
|
4009
|
+
};
|
|
4010
|
+
|
|
4011
|
+
function isElementInViewport(el) {
|
|
4011
4012
|
if (typeof jQuery === 'function' && el instanceof jQuery) {
|
|
4012
4013
|
el = el[0];
|
|
4013
4014
|
}
|
|
@@ -4020,15 +4021,21 @@ Wick.Forms = (function(){
|
|
|
4020
4021
|
);
|
|
4021
4022
|
}
|
|
4022
4023
|
|
|
4023
|
-
var showValidationErrors = function
|
|
4024
|
+
var showValidationErrors = function(form, errorMsg) {
|
|
4024
4025
|
var $form = $(form);
|
|
4025
4026
|
if (!$form.hasClass(formInvalid)) {
|
|
4026
4027
|
$form.find('.form-row__error').remove();
|
|
4027
|
-
$form.
|
|
4028
|
+
var $rows = $form.find(fieldRow).filter(function() {
|
|
4029
|
+
return $(this).is(':visible');
|
|
4030
|
+
});
|
|
4031
|
+
|
|
4032
|
+
$rows.append(validationError(errorMsg)).addClass(rowValidationError);
|
|
4028
4033
|
}
|
|
4029
4034
|
|
|
4030
|
-
var $firstMsg = $form.find(fieldRow).
|
|
4031
|
-
|
|
4035
|
+
var $firstMsg = $form.find(fieldRow).filter(function() {
|
|
4036
|
+
return $(this).is(':visible');
|
|
4037
|
+
}).first();
|
|
4038
|
+
if ($firstMsg.length && !isElementInViewport($firstMsg)) {
|
|
4032
4039
|
var inModal = $firstMsg.closest('.modal').length,
|
|
4033
4040
|
$scrollableEl = inModal ? $firstMsg.closest('.modal') : $('html, body'),
|
|
4034
4041
|
y = inModal ? 0 : $firstMsg.offset().top - 30;
|
|
@@ -4037,22 +4044,26 @@ Wick.Forms = (function(){
|
|
|
4037
4044
|
}
|
|
4038
4045
|
};
|
|
4039
4046
|
|
|
4040
|
-
var clearValidationErrors = function
|
|
4047
|
+
var clearValidationErrors = function(form) {
|
|
4041
4048
|
var $form = $(form);
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4049
|
+
|
|
4050
|
+
$form.removeClass(formInvalid);
|
|
4051
|
+
|
|
4052
|
+
$form.find(fieldRow)
|
|
4053
|
+
.removeClass(rowValidationError)
|
|
4054
|
+
.find(fieldError).remove();
|
|
4055
|
+
|
|
4056
|
+
$form.find(fieldError).remove();
|
|
4047
4057
|
};
|
|
4048
4058
|
|
|
4049
|
-
|
|
4059
|
+
|
|
4060
|
+
var handleSmoothScroll = function() {
|
|
4050
4061
|
$('html, body').animate({
|
|
4051
|
-
scrollTop: $('.cards-store-list').offset().top - 60
|
|
4062
|
+
scrollTop: $('.cards-store-list').offset().top - 60,
|
|
4052
4063
|
}, 300);
|
|
4053
4064
|
};
|
|
4054
4065
|
|
|
4055
|
-
var handleFormSubmit = function
|
|
4066
|
+
var handleFormSubmit = function() {
|
|
4056
4067
|
var form = this;
|
|
4057
4068
|
|
|
4058
4069
|
if ($(form).is('#form-login') || $(form).is('#form-register')) {
|
|
@@ -4066,21 +4077,21 @@ Wick.Forms = (function(){
|
|
|
4066
4077
|
}
|
|
4067
4078
|
|
|
4068
4079
|
if ($(form).is('#form-forgotten-password')) {
|
|
4069
|
-
if ($(form).find('#email').val().length){
|
|
4080
|
+
if ($(form).find('#email').val().length) {
|
|
4070
4081
|
window.location.href = './page_upd-pass.html';
|
|
4071
4082
|
return false;
|
|
4072
4083
|
}
|
|
4073
4084
|
}
|
|
4074
4085
|
|
|
4075
4086
|
if ($(form).is('#form-forgotten-password-popup')) {
|
|
4076
|
-
if ($(form).find('#email').val().length){
|
|
4087
|
+
if ($(form).find('#email').val().length) {
|
|
4077
4088
|
window.location.href = './page_checkout_sign-in.html';
|
|
4078
4089
|
return false;
|
|
4079
4090
|
}
|
|
4080
4091
|
}
|
|
4081
4092
|
|
|
4082
4093
|
if ($(form).is('#checkout-form-forgotten-password-popup')) {
|
|
4083
|
-
if ($(form).find('#email').val().length){
|
|
4094
|
+
if ($(form).find('#email').val().length) {
|
|
4084
4095
|
$('.modal-reset-wrap').addClass('d-block');
|
|
4085
4096
|
$('.request-pass').addClass('d-none');
|
|
4086
4097
|
$('.modal-title').text('Password Reset');
|
|
@@ -4089,7 +4100,7 @@ Wick.Forms = (function(){
|
|
|
4089
4100
|
}
|
|
4090
4101
|
|
|
4091
4102
|
if ($(form).is('.update-pass')) {
|
|
4092
|
-
if ($(form).find('#new-password').val().length && $(form).find('#confirmed-password').val().length){
|
|
4103
|
+
if ($(form).find('#new-password').val().length && $(form).find('#confirmed-password').val().length) {
|
|
4093
4104
|
window.location.href = './page_login.html';
|
|
4094
4105
|
return false;
|
|
4095
4106
|
}
|
|
@@ -4098,7 +4109,7 @@ Wick.Forms = (function(){
|
|
|
4098
4109
|
if ($(form).is('.change-email')) {
|
|
4099
4110
|
if ($(form).find('#new-email').val().length &&
|
|
4100
4111
|
$(form).find('#confirm-new-email').val().length &&
|
|
4101
|
-
$(form).find('#password').val().length){
|
|
4112
|
+
$(form).find('#password').val().length) {
|
|
4102
4113
|
window.location.href = './page_my-account.html';
|
|
4103
4114
|
return false;
|
|
4104
4115
|
}
|
|
@@ -4107,7 +4118,7 @@ Wick.Forms = (function(){
|
|
|
4107
4118
|
if ($(form).is('.form-change-password')) {
|
|
4108
4119
|
if ($(form).find('#current-password').val().length &&
|
|
4109
4120
|
$(form).find('#new-password').val().length &&
|
|
4110
|
-
$(form).find('#confirm-password').val().length){
|
|
4121
|
+
$(form).find('#confirm-password').val().length) {
|
|
4111
4122
|
window.location.href = './page_my-account.html';
|
|
4112
4123
|
return false;
|
|
4113
4124
|
}
|
|
@@ -4119,14 +4130,14 @@ Wick.Forms = (function(){
|
|
|
4119
4130
|
$(form).find('#postcode').val().length &&
|
|
4120
4131
|
$(form).find('#email').val().length &&
|
|
4121
4132
|
$(form).find('#password').val().length &&
|
|
4122
|
-
$(form).find('#confirm-password').val().length){
|
|
4133
|
+
$(form).find('#confirm-password').val().length) {
|
|
4123
4134
|
window.location.href = './page_my-account.html';
|
|
4124
4135
|
return false;
|
|
4125
4136
|
}
|
|
4126
4137
|
}
|
|
4127
4138
|
|
|
4128
4139
|
if ($(form).is('.form-personal-details')) {
|
|
4129
|
-
if ($(form).find('#first-name').val().length && $(form).find('#surname').val().length){
|
|
4140
|
+
if ($(form).find('#first-name').val().length && $(form).find('#surname').val().length) {
|
|
4130
4141
|
window.location.href = './page_my-account.html';
|
|
4131
4142
|
return false;
|
|
4132
4143
|
}
|
|
@@ -4134,26 +4145,26 @@ Wick.Forms = (function(){
|
|
|
4134
4145
|
|
|
4135
4146
|
if ($(form).is('.form-address-details')) {
|
|
4136
4147
|
if ($(form).find('#first-name').val().length &&
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4148
|
+
$(form).find('#second-name').val().length &&
|
|
4149
|
+
$(form).find('#address1').val().length &&
|
|
4150
|
+
$(form).find('#town-city').val().length &&
|
|
4151
|
+
$(form).find('#mobile-telephone').val().length) {
|
|
4141
4152
|
window.location.href = './page_my-account_address-book.html';
|
|
4142
4153
|
return false;
|
|
4143
4154
|
}
|
|
4144
4155
|
}
|
|
4145
4156
|
|
|
4146
4157
|
if ($(form).is('.form-locator')) {
|
|
4147
|
-
if ($(form).find('#store-id').val()){
|
|
4158
|
+
if ($(form).find('#store-id').val()) {
|
|
4148
4159
|
window.location.href = './page_store-locator-details.html';
|
|
4149
4160
|
return false;
|
|
4150
4161
|
}
|
|
4151
4162
|
}
|
|
4152
4163
|
|
|
4153
4164
|
if ($(form).is('.form-locator-list')) {
|
|
4154
|
-
if ($(form).find('#postcode-town').val().length){
|
|
4165
|
+
if ($(form).find('#postcode-town').val().length) {
|
|
4155
4166
|
var actionAfterSubmit = $(form).attr('data-action');
|
|
4156
|
-
if (actionAfterSubmit === 'scroll-to-list'){
|
|
4167
|
+
if (actionAfterSubmit === 'scroll-to-list') {
|
|
4157
4168
|
clearValidationErrors(this);
|
|
4158
4169
|
handleSmoothScroll();
|
|
4159
4170
|
} else {
|
|
@@ -4164,7 +4175,7 @@ Wick.Forms = (function(){
|
|
|
4164
4175
|
}
|
|
4165
4176
|
|
|
4166
4177
|
if ($(form).is('#form-mini-basket')) {
|
|
4167
|
-
if (Wick.User.isLoggedIn()){
|
|
4178
|
+
if (Wick.User.isLoggedIn()) {
|
|
4168
4179
|
window.location.href = './page_checkout_delivery-address.html';
|
|
4169
4180
|
} else {
|
|
4170
4181
|
window.location.href = './page_checkout_sign-in.html';
|
|
@@ -4172,7 +4183,7 @@ Wick.Forms = (function(){
|
|
|
4172
4183
|
return false;
|
|
4173
4184
|
}
|
|
4174
4185
|
|
|
4175
|
-
function isNotEmpty(field){
|
|
4186
|
+
function isNotEmpty(field) {
|
|
4176
4187
|
var $field = $(field);
|
|
4177
4188
|
var type = ($field.attr('type') || '').toLowerCase();
|
|
4178
4189
|
|
|
@@ -4196,7 +4207,7 @@ Wick.Forms = (function(){
|
|
|
4196
4207
|
|
|
4197
4208
|
if ($(form).is('#form-checkout-your-details')) {
|
|
4198
4209
|
var requiredFields = $(form).find('[data-row-required]:visible :input');
|
|
4199
|
-
if (_.every(requiredFields, isNotEmpty)){
|
|
4210
|
+
if (_.every(requiredFields, isNotEmpty)) {
|
|
4200
4211
|
window.location.href = $(form).attr('data-action');
|
|
4201
4212
|
return false;
|
|
4202
4213
|
}
|
|
@@ -4204,7 +4215,7 @@ Wick.Forms = (function(){
|
|
|
4204
4215
|
|
|
4205
4216
|
if ($(form).is('#checkout-your-details-modal')) {
|
|
4206
4217
|
var requiredFields = $(form).find('[data-row-required]:visible :input');
|
|
4207
|
-
if (_.every(requiredFields, isNotEmpty)){
|
|
4218
|
+
if (_.every(requiredFields, isNotEmpty)) {
|
|
4208
4219
|
$('#modalDeliveryEdit').modal('hide');
|
|
4209
4220
|
return false;
|
|
4210
4221
|
}
|
|
@@ -4218,15 +4229,15 @@ Wick.Forms = (function(){
|
|
|
4218
4229
|
}
|
|
4219
4230
|
}
|
|
4220
4231
|
|
|
4221
|
-
if ($(form).is('.checkout-register')){
|
|
4232
|
+
if ($(form).is('.checkout-register')) {
|
|
4222
4233
|
if ($(form).find('#password').val().length &&
|
|
4223
|
-
|
|
4234
|
+
$(form).find('#confirm-password').val().length) {
|
|
4224
4235
|
window.location.href = './page_my-account.html';
|
|
4225
4236
|
return false;
|
|
4226
4237
|
}
|
|
4227
4238
|
}
|
|
4228
4239
|
|
|
4229
|
-
if ($(form).is('#form-checkout-voucher')){
|
|
4240
|
+
if ($(form).is('#form-checkout-voucher')) {
|
|
4230
4241
|
if ($(form).find('#voucher-code').val().length) {
|
|
4231
4242
|
return false;
|
|
4232
4243
|
}
|
|
@@ -4238,11 +4249,11 @@ Wick.Forms = (function(){
|
|
|
4238
4249
|
}
|
|
4239
4250
|
}
|
|
4240
4251
|
|
|
4241
|
-
if ($(form).is('.header-search')){
|
|
4252
|
+
if ($(form).is('.header-search')) {
|
|
4242
4253
|
window.location.href = './page_search-results.html';
|
|
4243
4254
|
}
|
|
4244
4255
|
|
|
4245
|
-
if ($(form).is('.click-and-collect__locator-form')){
|
|
4256
|
+
if ($(form).is('.click-and-collect__locator-form')) {
|
|
4246
4257
|
var $form = $(form);
|
|
4247
4258
|
if ($form.find('#click-and-collect-town').val().length) {
|
|
4248
4259
|
clearValidationErrors(this);
|
|
@@ -4255,24 +4266,24 @@ Wick.Forms = (function(){
|
|
|
4255
4266
|
return false;
|
|
4256
4267
|
}
|
|
4257
4268
|
|
|
4258
|
-
if($(form).is('.form-track-order')) {
|
|
4259
|
-
|
|
4269
|
+
if ($(form).is('.form-track-order')) {
|
|
4270
|
+
var $form = $(form);
|
|
4260
4271
|
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4272
|
+
if ($form.find('#order').val().length &&
|
|
4273
|
+
$form.find('#tel').val().length &&
|
|
4274
|
+
$form.find('#email').val().length &&
|
|
4275
|
+
$form.find('#postcode').val().length) {
|
|
4276
|
+
clearValidationErrors(this);
|
|
4277
|
+
} else if (!$form.hasClass(formInvalid)) {
|
|
4278
|
+
$form.addClass(formInvalid);
|
|
4268
4279
|
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4280
|
+
$(fieldRow).each(function() {
|
|
4281
|
+
$(this).addClass(rowValidationError)
|
|
4282
|
+
.append('<div class="form-row__error">' + $(this).data('message') + '</div>');
|
|
4283
|
+
});
|
|
4284
|
+
}
|
|
4274
4285
|
|
|
4275
|
-
|
|
4286
|
+
return false;
|
|
4276
4287
|
}
|
|
4277
4288
|
|
|
4278
4289
|
if ($(form).is('#edit-billing-address')) {
|
|
@@ -4288,28 +4299,28 @@ Wick.Forms = (function(){
|
|
|
4288
4299
|
};
|
|
4289
4300
|
|
|
4290
4301
|
var scrollLocatorListPage = function() {
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4302
|
+
var isLocatorListPage = $('.cards-store-list').length;
|
|
4303
|
+
var isScrollNeeded = window.location.hash === '#stores-list';
|
|
4304
|
+
if (isLocatorListPage && isScrollNeeded) {
|
|
4305
|
+
handleSmoothScroll();
|
|
4306
|
+
}
|
|
4296
4307
|
};
|
|
4297
4308
|
|
|
4298
|
-
let bindEvents = function
|
|
4309
|
+
let bindEvents = function() {
|
|
4299
4310
|
let selector = excludedClassesForForm.reduce((acc, className) => {
|
|
4300
4311
|
return acc + ':not([class^="' + className + '"])';
|
|
4301
4312
|
}, 'form');
|
|
4302
4313
|
$(document).on('submit', selector, handleFormSubmit);
|
|
4303
4314
|
$forgotPassword.on('click', scenarios[2].action);
|
|
4304
|
-
$('.btn-cancel').on('click', function(){
|
|
4315
|
+
$('.btn-cancel').on('click', function() {
|
|
4305
4316
|
window.location.href = './page_my-account.html';
|
|
4306
4317
|
});
|
|
4307
|
-
$('.btn-previous').on('click', function(){
|
|
4318
|
+
$('.btn-previous').on('click', function() {
|
|
4308
4319
|
window.location.href = './page_login.html';
|
|
4309
4320
|
});
|
|
4310
4321
|
};
|
|
4311
4322
|
|
|
4312
|
-
var init = function
|
|
4323
|
+
var init = function() {
|
|
4313
4324
|
bindEvents();
|
|
4314
4325
|
scrollLocatorListPage();
|
|
4315
4326
|
};
|
|
@@ -4318,8 +4329,8 @@ Wick.Forms = (function(){
|
|
|
4318
4329
|
|
|
4319
4330
|
return {
|
|
4320
4331
|
showValidationErrors: showValidationErrors,
|
|
4321
|
-
clearValidationErrors: clearValidationErrors
|
|
4322
|
-
}
|
|
4332
|
+
clearValidationErrors: clearValidationErrors,
|
|
4333
|
+
};
|
|
4323
4334
|
})();
|
|
4324
4335
|
|
|
4325
4336
|
var Wick = Wick || {};
|
|
@@ -9948,6 +9959,8 @@ $(document).ready(function () {
|
|
|
9948
9959
|
initMyOrdersEvent();
|
|
9949
9960
|
});
|
|
9950
9961
|
|
|
9962
|
+
var Wick = Wick || {};
|
|
9963
|
+
|
|
9951
9964
|
const paymentLoader= '.payment-loader';
|
|
9952
9965
|
const paymentLoaderHideClass= 'payment-loader--hidden';
|
|
9953
9966
|
const paymentLoaderModal = '.payment-loader__modal'
|
|
@@ -9955,11 +9968,10 @@ const paymentTypeSelectors = {
|
|
|
9955
9968
|
apple: '.apple__button',
|
|
9956
9969
|
google: '.google__button',
|
|
9957
9970
|
clearpay: '#checkout-payment-details-clearpay',
|
|
9958
|
-
billie: '#checkout-payment-details-billie, .billie__button',
|
|
9959
9971
|
paypal: '#checkout-payment-details-paypal'
|
|
9960
9972
|
};
|
|
9961
9973
|
|
|
9962
|
-
function
|
|
9974
|
+
Wick.showPaymentLoader = function(paymentType) {
|
|
9963
9975
|
$(paymentLoader).find(`${paymentLoaderModal} > div`).hide();
|
|
9964
9976
|
$(`.${paymentType}-checkout-logo`).show();
|
|
9965
9977
|
$(`${paymentLoader} .spinner`).show();
|
|
@@ -9971,7 +9983,7 @@ function showPaymentLoader(paymentType) {
|
|
|
9971
9983
|
}
|
|
9972
9984
|
|
|
9973
9985
|
Object.entries(paymentTypeSelectors).forEach(([type, triggerSelector]) => {
|
|
9974
|
-
$(document).on('click', triggerSelector, () => showPaymentLoader(type));
|
|
9986
|
+
$(document).on('click', triggerSelector, () => Wick.showPaymentLoader(type));
|
|
9975
9987
|
});
|
|
9976
9988
|
|
|
9977
9989
|
var Wick = Wick || {};
|
|
@@ -11002,6 +11014,42 @@ Wick.ReferenceField = (function () {
|
|
|
11002
11014
|
init();
|
|
11003
11015
|
})();
|
|
11004
11016
|
|
|
11017
|
+
var Wick = Wick || {};
|
|
11018
|
+
|
|
11019
|
+
Wick.RepaymentToggle = (function () {
|
|
11020
|
+
const SELECTORS = {
|
|
11021
|
+
repaymentRadio: 'input[name="repaymentTerms"]',
|
|
11022
|
+
term: '.billie-info .term',
|
|
11023
|
+
paymentMethod: '[name="payment-method"]'
|
|
11024
|
+
};
|
|
11025
|
+
|
|
11026
|
+
function updateTerm(value) {
|
|
11027
|
+
const $term = $(SELECTORS.term);
|
|
11028
|
+
if (!$term.length) return;
|
|
11029
|
+
|
|
11030
|
+
$term.text(value);
|
|
11031
|
+
}
|
|
11032
|
+
|
|
11033
|
+
function bindEvents () {
|
|
11034
|
+
$(document).on('change', SELECTORS.repaymentRadio, function () {
|
|
11035
|
+
const value = $(this).val();
|
|
11036
|
+
if (!value) return;
|
|
11037
|
+
|
|
11038
|
+
updateTerm(value);
|
|
11039
|
+
|
|
11040
|
+
const currentMethod = $(SELECTORS.paymentMethod + ':checked').val();
|
|
11041
|
+
if (currentMethod !== 'billie') return;
|
|
11042
|
+
|
|
11043
|
+
if (typeof Wick.showPaymentLoader === 'function') {
|
|
11044
|
+
Wick.showPaymentLoader('billie');
|
|
11045
|
+
}
|
|
11046
|
+
|
|
11047
|
+
});
|
|
11048
|
+
}
|
|
11049
|
+
|
|
11050
|
+
bindEvents();
|
|
11051
|
+
})();
|
|
11052
|
+
|
|
11005
11053
|
var Wick = Wick || {};
|
|
11006
11054
|
Wick.Selectable = (function(){
|
|
11007
11055
|
$selectable = $('.js-selectable'),
|