2021-09-08 05:26:31 -04:00
|
|
|
import { setupSearch } from './search'
|
|
|
|
|
|
|
|
document
|
|
|
|
.querySelectorAll('[data-ol-contact-form-with-search]')
|
|
|
|
.forEach(setupSearch)
|
|
|
|
|
2021-09-23 05:47:48 -04:00
|
|
|
document
|
|
|
|
.querySelectorAll('[data-ol-open-contact-form-modal="contact-us"]')
|
|
|
|
.forEach(el => {
|
|
|
|
el.addEventListener('click', function (e) {
|
|
|
|
e.preventDefault()
|
|
|
|
$('[data-ol-contact-form-modal="contact-us"]').modal()
|
|
|
|
})
|
2021-09-08 05:26:31 -04:00
|
|
|
})
|
2021-09-22 07:13:18 -04:00
|
|
|
|
|
|
|
document
|
|
|
|
.querySelectorAll('[data-ol-open-contact-form-modal="general"]')
|
|
|
|
.forEach(el => {
|
|
|
|
el.addEventListener('click', function (e) {
|
|
|
|
e.preventDefault()
|
|
|
|
$('[data-ol-contact-form-modal="general"]').modal()
|
|
|
|
})
|
|
|
|
})
|
2024-05-16 09:04:21 -04:00
|
|
|
|
2024-06-11 04:36:08 -04:00
|
|
|
document.querySelectorAll('[data-ol-contact-form]').forEach(el => {
|
2024-05-16 09:04:21 -04:00
|
|
|
el.addEventListener('submit', function (e) {
|
|
|
|
const emailValue = document.querySelector(
|
|
|
|
'[data-ol-contact-form-email-input]'
|
|
|
|
).value
|
|
|
|
const thankYouEmailEl = document.querySelector(
|
|
|
|
'[data-ol-contact-form-thank-you-email]'
|
|
|
|
)
|
|
|
|
thankYouEmailEl.textContent = emailValue
|
|
|
|
})
|
|
|
|
})
|