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:
@@ -86,6 +86,10 @@
|
||||
.biz-field textarea:focus{border-color:var(--brass);background:rgba(255,255,255,.08)}
|
||||
.biz-field textarea::placeholder{color:rgba(255,255,255,.3)}
|
||||
.biz-form .btn-lg{margin-top:.5rem;width:100%}
|
||||
.biz-checkbox-group{display:flex;flex-direction:column;gap:.6rem;margin-bottom:1rem}
|
||||
.biz-checkbox{display:flex;align-items:center;gap:.6rem;font-family:Inter,sans-serif;font-size:.85rem;color:rgba(255,255,255,.75);cursor:pointer;user-select:none;transition:color .2s}
|
||||
.biz-checkbox:hover{color:#fff}
|
||||
.biz-checkbox input[type="checkbox"]{width:1.05rem;height:1.05rem;accent-color:var(--brass);cursor:pointer;flex-shrink:0}
|
||||
.biz-success{margin-top:1.5rem}.biz-success i{font-size:2.5rem;color:var(--success);margin-bottom:.75rem}
|
||||
.biz-success h3{color:#fff;margin-bottom:.5rem}.biz-success p{color:rgba(255,255,255,.65);font-size:.95rem;max-width:480px;margin:0 auto 1.25rem;line-height:1.7}
|
||||
</style>
|
||||
@@ -404,6 +408,11 @@
|
||||
<label for="bizChallenges">Current Challenges</label>
|
||||
<textarea id="bizChallenges" placeholder="What problems are you facing? Manual processes, data silos, growth pains, lack of visibility..." required></textarea>
|
||||
</div>
|
||||
<div class="biz-checkbox-group">
|
||||
<label class="biz-checkbox"><input type="checkbox" id="bizHasHomepage" /> I already have a homepage</label>
|
||||
<label class="biz-checkbox"><input type="checkbox" id="bizUsesOdoo" /> I already use ODOO</label>
|
||||
<label class="biz-checkbox"><input type="checkbox" id="bizHasDeveloper" /> I already have a developer for modules</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-brass btn-lg" id="bizSubmitBtn">Generate My Project Plan →</button>
|
||||
</form>
|
||||
<div class="biz-success" id="bizSuccess" style="display:none">
|
||||
|
||||
@@ -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 {}; }); })
|
||||
|
||||
@@ -793,6 +793,32 @@ img { max-width: 100%; height: auto; vertical-align: middle; }
|
||||
}
|
||||
.biz-field textarea::placeholder { color: rgba(255,255,255,0.3); }
|
||||
.biz-form .btn-lg { margin-top: 0.5rem; width: 100%; }
|
||||
.biz-checkbox-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.6rem;
|
||||
margin-bottom: 1rem;
|
||||
padding: 0;
|
||||
}
|
||||
.biz-checkbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
font-family: Inter, sans-serif;
|
||||
font-size: 0.85rem;
|
||||
color: rgba(255,255,255,0.75);
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
.biz-checkbox:hover { color: #fff; }
|
||||
.biz-checkbox input[type="checkbox"] {
|
||||
width: 1.05rem;
|
||||
height: 1.05rem;
|
||||
accent-color: var(--brass);
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.biz-success { margin-top: 1.5rem; }
|
||||
.biz-success i { font-size: 2.5rem; color: var(--success); margin-bottom: 0.75rem; }
|
||||
.biz-success h3 { color: #fff; margin-bottom: 0.5rem; }
|
||||
|
||||
Reference in New Issue
Block a user