mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-28 04:20:53 +00:00
0f594db5a9
[web] contact-form: swap the element selector for the open form trigger GitOrigin-RevId: f4d5c437fc2021d7559f5948350c13e5cb847e11
23 lines
615 B
JavaScript
23 lines
615 B
JavaScript
import { setupSearch } from './search'
|
|
|
|
document
|
|
.querySelectorAll('[data-ol-contact-form-with-search]')
|
|
.forEach(setupSearch)
|
|
|
|
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()
|
|
})
|
|
})
|
|
|
|
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()
|
|
})
|
|
})
|