Public Access
feat: add Bring Your Business wizard, replace final CTA
- Replace .final-cta section with .biz-wizard section - Three textarea fields: Business Description, My Goals, Current Challenges - On submit, POSTs to webhook endpoint that triggers AI Agent to generate a personalized Odoo project plan PDF - On success, shows download button if webhook returns download_url - Inline + external CSS: midnight background, brass-accented form fields - Scroll animation observer updated to target .biz-wizard .container - Remove all .final-cta CSS from style.css and inline critical styles
This commit is contained in:
@@ -568,7 +568,7 @@ var si = 0,
|
||||
}, { threshold: 0.12, rootMargin: '0px 0px -40px 0px' });
|
||||
|
||||
var grids = document.querySelectorAll(
|
||||
'.features-grid, .faq-grid, .pricing-grid, .blog-grid, .final-cta .container'
|
||||
'.features-grid, .faq-grid, .pricing-grid, .blog-grid, .biz-wizard .container'
|
||||
);
|
||||
grids.forEach(function (g) {
|
||||
g.dataset.section = g.className || 'anon';
|
||||
@@ -577,3 +577,46 @@ var si = 0,
|
||||
observer.observe(g);
|
||||
});
|
||||
})();
|
||||
|
||||
/* ---- Business Wizard Form ---- */
|
||||
(function () {
|
||||
var form = document.getElementById('bizForm');
|
||||
if (!form) return;
|
||||
var success = document.getElementById('bizSuccess');
|
||||
var downloadBtn = document.getElementById('bizDownloadBtn');
|
||||
var submitBtn = document.getElementById('bizSubmitBtn');
|
||||
|
||||
form.addEventListener('submit', function (e) {
|
||||
e.preventDefault();
|
||||
var description = document.getElementById('bizDescription').value.trim();
|
||||
var goals = document.getElementById('bizGoals').value.trim();
|
||||
var challenges = document.getElementById('bizChallenges').value.trim();
|
||||
if (!description || !goals || !challenges) return;
|
||||
|
||||
submitBtn.textContent = 'Generating...';
|
||||
submitBtn.disabled = true;
|
||||
|
||||
fetch('https://002-001-5dd6e535-4d1c-46bc-9bd9-42ad4bc5f082.odoo4projects.com/webhook/7e3a2e80-8f1c-4c1a-a5d2-6b8e9f0c1d2e', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
description: description,
|
||||
goals: goals,
|
||||
challenges: challenges
|
||||
})
|
||||
})
|
||||
.then(function (r) { return r.json().catch(function () { return {}; }); })
|
||||
.then(function (data) {
|
||||
form.style.display = 'none';
|
||||
success.style.display = 'block';
|
||||
if (data.download_url) {
|
||||
downloadBtn.href = data.download_url;
|
||||
downloadBtn.style.display = 'inline-block';
|
||||
}
|
||||
})
|
||||
.catch(function () {
|
||||
submitBtn.textContent = 'Generate My Project Plan \u2192';
|
||||
submitBtn.disabled = false;
|
||||
});
|
||||
});
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user