It'd be great for DocumentCloud users to learn about our "For the Record" email and have the chance to sign up for it.
Based on our handling in muckrock views.py and utils.py, we can add a NewsletterSignupForm component that collects an email users to our MuckRock-wide MailChimp list. Structurally, this should look like:
- A form component that calls a form action
subscribeToMailchimp
- A reusable handler
subscribeToMailchimp that's used in the +page.server.ts of pages that host the subscribe form.
Signups should also be tagged:
- "Newsletter For the Record"
- "Newsletter DocumentCloud"
We'll need to add a few new environment variables, which can be copied from our MuckRock Requests environment:
MAILCHIMP_API_ROOT
MAILCHIMP_API_KEY
MAILCHIMP_LIST_DEFAULT
It'd be great for DocumentCloud users to learn about our "For the Record" email and have the chance to sign up for it.
Based on our handling in
muckrockviews.pyandutils.py, we can add aNewsletterSignupFormcomponent that collects an email users to our MuckRock-wide MailChimp list. Structurally, this should look like:subscribeToMailchimpsubscribeToMailchimpthat's used in the+page.server.tsof pages that host the subscribe form.Signups should also be tagged:
We'll need to add a few new environment variables, which can be copied from our MuckRock Requests environment:
MAILCHIMP_API_ROOTMAILCHIMP_API_KEYMAILCHIMP_LIST_DEFAULT