From 7810a1e86ac520d5ea1ca54a0b91ab58040f69ad Mon Sep 17 00:00:00 2001
From: John Tordoff <>
Date: Mon, 20 Nov 2023 15:06:06 -0500
Subject: [PATCH 1/2] Add AGU Conference campaign
---
framework/auth/campaigns.py | 9 +++++++
tests/test_campaigns.py | 1 +
website/mails/mails.py | 4 +++
.../confirm_agu_conference_2024.html.mako | 25 +++++++++++++++++++
website/util/metrics.py | 1 +
5 files changed, 40 insertions(+)
create mode 100644 website/templates/emails/confirm_agu_conference_2024.html.mako
diff --git a/framework/auth/campaigns.py b/framework/auth/campaigns.py
index 64552a8f5ef..9d418e863e0 100644
--- a/framework/auth/campaigns.py
+++ b/framework/auth/campaigns.py
@@ -91,6 +91,15 @@ def get_campaigns():
}
})
+ newest_campaigns.update({
+ 'agu_conference_2023': {
+ 'system_tag': CampaignSourceTags.AguConference2023.value,
+ 'redirect_url': '',
+ 'confirmation_email_template': mails.CONFIRM_EMAIL_AGU_CONFERENCE_2023,
+ 'login_type': 'native',
+ }
+ })
+
CAMPAIGNS = newest_campaigns
CAMPAIGNS_LAST_REFRESHED = timezone.now()
diff --git a/tests/test_campaigns.py b/tests/test_campaigns.py
index 442d1d1f931..66cb7f348db 100644
--- a/tests/test_campaigns.py
+++ b/tests/test_campaigns.py
@@ -44,6 +44,7 @@ def setUp(self):
'psyarxiv-preprints',
'osf-registries',
'osf-registered-reports',
+ 'agu_conference_2023',
]
self.refresh = timezone.now()
campaigns.CAMPAIGNS = None # force campaign refresh now that preprint providers are populated
diff --git a/website/mails/mails.py b/website/mails/mails.py
index d0263c59f95..4ecb438a7e8 100644
--- a/website/mails/mails.py
+++ b/website/mails/mails.py
@@ -188,6 +188,10 @@ def get_english_article(word):
'confirm_erpc',
subject='OSF Account Verification, Election Research Preacceptance Competition'
)
+CONFIRM_EMAIL_AGU_CONFERENCE_2023 = Mail(
+ 'confirm_agu_conference_2023',
+ subject='OSF Account Verification, from the American Geophysical Union Conference'
+)
CONFIRM_EMAIL_PREPRINTS = lambda name, provider: Mail(
'confirm_preprints_{}'.format(name),
subject='OSF Account Verification, {}'.format(provider)
diff --git a/website/templates/emails/confirm_agu_conference_2024.html.mako b/website/templates/emails/confirm_agu_conference_2024.html.mako
new file mode 100644
index 00000000000..6d61636068c
--- /dev/null
+++ b/website/templates/emails/confirm_agu_conference_2024.html.mako
@@ -0,0 +1,25 @@
+<%inherit file="notify_base.mako" />
+
+<%def name="content()">
+
+
+ Hello ${user.fullname},
+
+
+ Thank you for joining us at the AGU Open Science Pavilion, and welcome to the Open Science Framework.
+
+ We are pleased to offer a special AGU attendees exclusive community call to continue our conversation and to help
+ you get oriented on the OSF. This is an opportunity for us to show you useful OSF features, talk about
+ open science in your domains, and for you to ask any questions you may have.
+ You can register for this free event here:
+
+ https://cos-io.zoom.us/meeting/register/tZAuceCvrjotHNG3n6XzLFDv1Rnn2hkjczHr
+
+ To continue, please verify your email address by visiting this link:
+
+ ${confirmation_url}
+
+ From the team at the Center for Open Science
+
+ |
+%def>
diff --git a/website/util/metrics.py b/website/util/metrics.py
index 4416b4f5cd4..19c9773e935 100644
--- a/website/util/metrics.py
+++ b/website/util/metrics.py
@@ -49,6 +49,7 @@ class CampaignSourceTags(Enum):
ErpChallenge = campaign_source_tag('erp_challenge')
OsfRegisteredReports = campaign_source_tag('osf_registered_reports')
Osf4m = campaign_source_tag('osf4m')
+ AguConference2023 = campaign_source_tag('agu_conference_2023')
class OsfClaimedTags(Enum):
From 9e0322d9ba888900a9fdc04b794af9abd50b0ad0 Mon Sep 17 00:00:00 2001
From: Matt Frazier
Date: Tue, 28 Nov 2023 18:18:35 -0500
Subject: [PATCH 2/2] Rename, reword template - Fix redirect
---
framework/auth/campaigns.py | 2 +-
...e_2024.html.mako => confirm_agu_conference_2023.html.mako} | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
rename website/templates/emails/{confirm_agu_conference_2024.html.mako => confirm_agu_conference_2023.html.mako} (88%)
diff --git a/framework/auth/campaigns.py b/framework/auth/campaigns.py
index 9d418e863e0..95203e058ca 100644
--- a/framework/auth/campaigns.py
+++ b/framework/auth/campaigns.py
@@ -94,7 +94,7 @@ def get_campaigns():
newest_campaigns.update({
'agu_conference_2023': {
'system_tag': CampaignSourceTags.AguConference2023.value,
- 'redirect_url': '',
+ 'redirect_url': furl.furl(DOMAIN).add(path='dashboard/').url,
'confirmation_email_template': mails.CONFIRM_EMAIL_AGU_CONFERENCE_2023,
'login_type': 'native',
}
diff --git a/website/templates/emails/confirm_agu_conference_2024.html.mako b/website/templates/emails/confirm_agu_conference_2023.html.mako
similarity index 88%
rename from website/templates/emails/confirm_agu_conference_2024.html.mako
rename to website/templates/emails/confirm_agu_conference_2023.html.mako
index 6d61636068c..429ec911410 100644
--- a/website/templates/emails/confirm_agu_conference_2024.html.mako
+++ b/website/templates/emails/confirm_agu_conference_2023.html.mako
@@ -14,8 +14,8 @@
You can register for this free event here:
https://cos-io.zoom.us/meeting/register/tZAuceCvrjotHNG3n6XzLFDv1Rnn2hkjczHr
-
- To continue, please verify your email address by visiting this link:
+
+ To confirm your OSF account, please verify your email address by visiting this link:
${confirmation_url}