send telegram
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user