1console.log("schedule demo") 2/////////////////////////////////////////////////////////// 3////////////////////////// Schedule Demo Modal //////////// 4/////////////////////////////////////////////////////////// 5 6// Get all elements with the class 'openModalBtn' 7const openModalBtns = document.querySelectorAll('.openModalBtn'); 8const modal = document.getElementById('modal'); 9const closeModalBtn = document.getElementById('closeModalBtn'); 10 11// Function to open the modal 12function openModal() { 13 modal.style.display = 'flex'; 14 // document.querySelector('html').style.overflow = "hidden" 15} 16 17// Function to close the modal 18function closeModal() { 19 modal.style.display = 'none'; 20 document.querySelector('#crmWebToEntityForm').style.display = "block" 21 document.querySelector('.modal-content > .text-group').style.display = "flex" 22 document.querySelector('.receipt').style.display = "none" 23 // document.querySelector('html').style.overflow = "unset" 24 25 clearFormInputs("modal") 26} 27 28// Attach event listeners to all 'openModalBtn' elements 29openModalBtns.forEach((btn) => { 30 btn.addEventListener('click', openModal); 31}); 32 33// Attach event listener to the close button 34closeModalBtn.addEventListener('click', closeModal); 35 36 37 38// Close modal when clicking outside the modal content 39window.addEventListener('click', (event) => { 40 if (event.target === modal) { 41 closeModal(); 42 } 43}); 44 45// Clear all input in form 46function clearFormInputs(formId) { 47 // Get the form element by its ID 48 const form = document.getElementById(formId); 49 50 // Check if the form exists 51 if (form) { 52 // Select all input elements within the form 53 const inputs = form.querySelectorAll('input[type="text"]'); 54 55 // Iterate over the inputs and set their value to an empty string 56 inputs.forEach((input) => { 57 input.value = ''; 58 }); 59 } else { 60 console.warn(`Form with ID "${formId}" not found.`); 61 } 62} 63 64 65// closeModalBtn.addEventListener('click', showReceipt); 66function showReceipt() { 67 document.querySelector('#crmWebToEntityForm').style.display = "none" 68 document.querySelector('.modal-content > .text-group').style.display = "none" 69 document.querySelector('.receipt').style.display = "flex" 70 setTimeout(function(){ 71 closeModal() 72 },5000); 73}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.