Maks | disable captcha

web_99
Боевой сайт 2 months ago
parent 94862c9a5d
commit 4a719ad204
  1. 16
      local/templates/.default/js/custom.js

@ -30,9 +30,9 @@ function cartCheckout(formElement) {
const formData = new FormData(formElement); const formData = new FormData(formElement);
const submitButton = formElement.querySelector('button[type=submit]'); const submitButton = formElement.querySelector('button[type=submit]');
formData.forEach((value, key) => { // formData.forEach((value, key) => {
console.log(`${key}: ${value}`); // console.log(`${key}: ${value}`);
}); // });
} }
@ -131,15 +131,7 @@ function handleConsultationForm(formElement) {
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
if (data.success) { if (data.success) {
const isFooterPopup = formElement.querySelector('[name="footer_popup_form"]'); window.location.href = '/spasibo-blue/';
const isConsultation = formElement.querySelector('[name="consultation_form"]');
if (isFooterPopup) {
window.location.href = '/spasibo_blue/';
} else if (isConsultation) {
window.location.href = '/spasibo-footer/';
}
formElement.reset(); formElement.reset();
} else { } else {
showCartToast("Ошибка при отправке заявки", 3000, 'error'); showCartToast("Ошибка при отправке заявки", 3000, 'error');

Loading…
Cancel
Save