Public Access
feat: add checkboxes and update webhook for business wizard
- Add 3 checkboxes between textareas and submit button: - I already have a homepage (bizHasHomepage) - I already use ODOO (bizUsesOdoo) - I already have a developer for modules (bizHasDeveloper) - POST to /webhook/report instead of old webhook UUID - Include checkbox boolean values in request body - Add .biz-checkbox-group and .biz-checkbox CSS (inline + external)
This commit is contained in:
@@ -593,16 +593,23 @@ var si = 0,
|
||||
var challenges = document.getElementById('bizChallenges').value.trim();
|
||||
if (!description || !goals || !challenges) return;
|
||||
|
||||
var hasHomepage = document.getElementById('bizHasHomepage').checked;
|
||||
var usesOdoo = document.getElementById('bizUsesOdoo').checked;
|
||||
var hasDeveloper = document.getElementById('bizHasDeveloper').checked;
|
||||
|
||||
submitBtn.textContent = 'Generating...';
|
||||
submitBtn.disabled = true;
|
||||
|
||||
fetch('https://002-001-5dd6e535-4d1c-46bc-9bd9-42ad4bc5f082.odoo4projects.com/webhook/7e3a2e80-8f1c-4c1a-a5d2-6b8e9f0c1d2e', {
|
||||
fetch('https://002-001-5dd6e535-4d1c-46bc-9bd9-42ad4bc5f082.odoo4projects.com/webhook/report', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
description: description,
|
||||
goals: goals,
|
||||
challenges: challenges
|
||||
challenges: challenges,
|
||||
has_homepage: hasHomepage,
|
||||
uses_odoo: usesOdoo,
|
||||
has_developer: hasDeveloper
|
||||
})
|
||||
})
|
||||
.then(function (r) { return r.json().catch(function () { return {}; }); })
|
||||
|
||||
Reference in New Issue
Block a user