diff --git a/2026-04-18_18-42-04.png b/2026-04-18_18-42-04.png new file mode 100644 index 00000000..4ed3f0ac Binary files /dev/null and b/2026-04-18_18-42-04.png differ diff --git a/index3.js b/index3.js index 5e6946f6..03b92d71 100644 --- a/index3.js +++ b/index3.js @@ -22,7 +22,6 @@ const mobileToggle = document.getElementById('mobileToggle') const orderSuccess = document.getElementById('orderSuccess') const contactSuccess = document.getElementById('contactSuccess') const wooCommerceConfig = window.test1WooCommerce || null - const leadFormConfig = window.test1LeadForm || null const cartPageUrl = (wooCommerceConfig && wooCommerceConfig.cartUrl) ? wooCommerceConfig.cartUrl : '/cart/' const checkoutPageUrl = (wooCommerceConfig && wooCommerceConfig.checkoutUrl) ? wooCommerceConfig.checkoutUrl : '/checkout/' const cartPanel = cartDrawer?.querySelector('.cart-panel') @@ -147,6 +146,8 @@ const mobileToggle = document.getElementById('mobileToggle') formElement.addEventListener('submit', async event => { event.preventDefault() + const leadFormConfig = window.test1LeadForm || null + if (!leadFormConfig?.ajaxUrl || !leadFormConfig?.action || !leadFormConfig?.nonce) { window.alert('Форма временно недоступна. Обновите страницу и попробуйте снова.') return diff --git a/wp-content/themes/twentytwentyfour/assets/js/test1-contacts.js b/wp-content/themes/twentytwentyfour/assets/js/test1-contacts.js index eff10c9c..cb694bc2 100644 --- a/wp-content/themes/twentytwentyfour/assets/js/test1-contacts.js +++ b/wp-content/themes/twentytwentyfour/assets/js/test1-contacts.js @@ -1,7 +1,6 @@ (() => { const contactForm = document.getElementById('contactForm') const contactSuccess = document.getElementById('contactSuccess') - const formConfig = window.test1ContactsForm || null if (!contactForm || !contactSuccess) { return @@ -10,6 +9,8 @@ contactForm.addEventListener('submit', async event => { event.preventDefault() + const formConfig = window.test1ContactsForm || null + if (!formConfig?.ajaxUrl || !formConfig?.action || !formConfig?.nonce) { window.alert('Форма временно недоступна. Обновите страницу и попробуйте снова.') return diff --git a/wp-content/themes/twentytwentyfour/page-test1.php b/wp-content/themes/twentytwentyfour/page-test1.php index 041bc452..fdfd87a6 100644 --- a/wp-content/themes/twentytwentyfour/page-test1.php +++ b/wp-content/themes/twentytwentyfour/page-test1.php @@ -167,6 +167,7 @@ HTML; $landing_html = preg_replace( '/