diff --git a/components/ThemedInput.vue b/components/ThemedInput.vue
index 50d0229..c8c6b3a 100644
--- a/components/ThemedInput.vue
+++ b/components/ThemedInput.vue
@@ -1,12 +1,12 @@
{{ instructions }}
{{ $t("common.email") }} @@ -139,6 +146,7 @@ const editMode = ref(false); const firstName = ref(''); const lastName = ref(''); + const mktgEmailOptIn = ref(false); const firstErr = ref(false); const lastErr = ref(false); const isDirty = ref(false); @@ -148,10 +156,11 @@ // Intialize the form with the user's current name firstName.value = pageContext.user?.first_name ?? ''; lastName.value = pageContext.user?.last_name ?? ''; + mktgEmailOptIn.value = pageContext.user?.mktg_email_opt_in ?? false; // Watch for changes to the form fields and set the dirty flag watch( - () => [firstName.value, lastName.value, fileToUploadName.value], + () => [firstName.value, lastName.value, fileToUploadName.value, mktgEmailOptIn.value], () => { if (isDirty.value) return; // Don't set dirty flag if already dirty isDirty.value = true; @@ -282,6 +291,7 @@ const response = await axios.patch(`/users/${pageContext.user.uuid}`, { first_name: firstName.value, last_name: lastName.value, + mktg_email_opt_in: mktgEmailOptIn.value, }); if (!response.data) { diff --git a/components/complete_registration/TimezoneForm.vue b/components/complete_registration/TimezoneForm.vue index 406e1ef..fc83d57 100644 --- a/components/complete_registration/TimezoneForm.vue +++ b/components/complete_registration/TimezoneForm.vue @@ -29,6 +29,12 @@ />