Fix JS syntax errors in modal success buttons (broken single quotes)
This commit is contained in:
@@ -166,6 +166,7 @@
|
|||||||
errEl.style.display = 'none';
|
errEl.style.display = 'none';
|
||||||
document.querySelectorAll('.am-invalid').forEach(el => el.classList.remove('am-invalid'));
|
document.querySelectorAll('.am-invalid').forEach(el => el.classList.remove('am-invalid'));
|
||||||
}
|
}
|
||||||
|
window._closeAccessModal = function() { closeModal(); productsLoaded = false; };
|
||||||
|
|
||||||
async function loadProducts() {
|
async function loadProducts() {
|
||||||
const wrap = document.getElementById('am-products');
|
const wrap = document.getElementById('am-products');
|
||||||
@@ -249,7 +250,7 @@
|
|||||||
'<div class="am-success-title">Запрос отправлен</div>' +
|
'<div class="am-success-title">Запрос отправлен</div>' +
|
||||||
'<div class="am-success-sub">После утверждения доступы придут на электронную почту <strong>' + email + '</strong></div>' +
|
'<div class="am-success-sub">После утверждения доступы придут на электронную почту <strong>' + email + '</strong></div>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
footer.innerHTML = '<button type="button" class="access-btn-cancel" onclick="this.closest('.access-modal-overlay').style.display=\'none\';document.body.style.overflow=\'\';productsLoaded=false;">Закрыть</button>';
|
footer.innerHTML = '<button type="button" class="access-btn-cancel" onclick="window._closeAccessModal()">Закрыть</button>';
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
errEl.textContent = e.message || 'Ошибка отправки, попробуйте позже';
|
errEl.textContent = e.message || 'Ошибка отправки, попробуйте позже';
|
||||||
errEl.style.display = 'block';
|
errEl.style.display = 'block';
|
||||||
@@ -353,6 +354,7 @@
|
|||||||
errEl.style.display = 'none';
|
errEl.style.display = 'none';
|
||||||
document.querySelectorAll('#contact-modal .am-invalid').forEach(el => el.classList.remove('am-invalid'));
|
document.querySelectorAll('#contact-modal .am-invalid').forEach(el => el.classList.remove('am-invalid'));
|
||||||
}
|
}
|
||||||
|
window._closeContactModal = closeContact;
|
||||||
|
|
||||||
async function submitContact() {
|
async function submitContact() {
|
||||||
const name = document.getElementById('cm-name').value.trim();
|
const name = document.getElementById('cm-name').value.trim();
|
||||||
@@ -402,7 +404,7 @@
|
|||||||
'<div class="am-success-sub">Сообщение получено — свяжемся с вами в ближайшее время</div>' +
|
'<div class="am-success-sub">Сообщение получено — свяжемся с вами в ближайшее время</div>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
document.getElementById('cm-footer').innerHTML =
|
document.getElementById('cm-footer').innerHTML =
|
||||||
'<button type="button" class="access-btn-cancel" onclick="document.getElementById('contact-modal').style.display='none';document.body.style.overflow='';">Закрыть</button>';
|
'<button type="button" class="access-btn-cancel" onclick="window._closeContactModal()">Закрыть</button>';
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
errEl.textContent = e.message || 'Ошибка отправки, попробуйте позже';
|
errEl.textContent = e.message || 'Ошибка отправки, попробуйте позже';
|
||||||
errEl.style.display = 'block';
|
errEl.style.display = 'block';
|
||||||
|
|||||||
Reference in New Issue
Block a user