Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions src/lib/components/onboarding/OnboardingFlow.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@
// Airtable record id from the step-2 submission; later submissions send it
// back so the server updates the record instead of creating another.
let recordId = $state('')
// V2 prototype: "Keep me informed" is the INFORMATIONAL opt-in (global +
// local-chapter updates). It is a genuine opt-in for everyone including
// Volunteers/Leads — never pre-checked or forced (marketing consent must be
// freely given); operational volunteer comms ride legitimate interest instead.
let keepInformed = $state(false)
let submitting = $state(false)
let browseSignedUp = $state(false)
Expand Down Expand Up @@ -141,9 +145,9 @@
let becomePayingMember = $state(false)

// GDPR data-processing consent gating every record-creating submission
// (step 2 + browse). Chapter-sharing consent is not bundled here: it lives
// in the optional "Keep me informed" opt-in, since we only share details
// with a local chapter when the person asks to be connected to one.
// (step 2 + browse). NB: the server also hardcodes chapter-sharing consent
// on every record today — whether that should instead follow the involvement
// axis / bell rather than a forced checkbox is an open question (see PR body).
let gdprConsent = $state(false)

// Phone: dial code prefilled from country of residence, editable in case
Expand Down Expand Up @@ -477,13 +481,15 @@
<input type="hidden" name="keep_informed" value="on" />
{/if}
<h2>{msgs.onboarding_step2_heading}</h2>
<p class="section-label">Want to hear from us?</p>
<div class="intent-grid">
<button
type="button"
class="intent-option"
class:selected={keepInformed}
role="checkbox"
aria-checked={keepInformed}
aria-describedby="critical-alert-notice"
onclick={() => (keepInformed = !keepInformed)}
>
<span class="intent-icon">
Expand All @@ -494,7 +500,7 @@
</span>
<span class="intent-label">{msgs.onboarding_intent_keep_informed_label}</span>
<span class="intent-sub">
{msgs.onboarding_intent_keep_informed_sub}
Get global campaign updates, plus news from your local PauseAI chapter.
</span>
</button>
<button
Expand All @@ -517,6 +523,11 @@
</span>
</button>
</div>
<p class="helper" id="critical-alert-notice">
We may occasionally send you a critical alert, even if you don't opt into any of these.
You can unsubscribe from any list at any time. See our
<LinkWithoutIcon href="/privacy" target="_blank">privacy policy</LinkWithoutIcon>.
</p>
<p class="section-label">{msgs.onboarding_intent_more_optional}</p>
<div class="intent-stack" role="radiogroup" aria-label="Want to do more?">
{#each intentOptions as option (option.key)}
Expand All @@ -540,11 +551,7 @@
{/each}
</div>
{@render gdprConsentField()}
<button
type="submit"
class="primary"
disabled={(!intent && !keepInformed && !basics.newsletter) || !gdprConsent || submitting}
>
<button type="submit" class="primary" disabled={!gdprConsent || submitting}>
{submitting
? msgs.onboarding_btn_submitting
: intent === 'volunteer' || intent === 'lead'
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/onboarding/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ const en: OnboardingMessages = {
onboarding_intent_lead_label: 'I want to lead',
onboarding_intent_lead_sub: "I'm ready to organize in my country or region.",
onboarding_gdpr_consent:
'I agree to the <a target="_blank" rel="noopener noreferrer" href="/privacy">Privacy Policy</a>, including sharing my details with my local PauseAI chapter (which may be a separate entity to PauseAI Global) for local coordination.&nbsp;*',
'I agree to the <a target="_blank" rel="noopener noreferrer" href="/privacy">Privacy Policy</a>. I understand my details will be shared with my local PauseAI chapter (which may be a separate entity to PauseAI Global) for local coordination.&nbsp;*',
onboarding_btn_submit: 'Submit →',
onboarding_btn_submitting: 'Submitting...',
onboarding_btn_back: '← Back',
Expand Down
Loading