From f71d5a9729f1c75816e15350888e555576c06ffa Mon Sep 17 00:00:00 2001 From: Mavis Ou Date: Tue, 10 Sep 2024 09:56:27 -0700 Subject: [PATCH 1/3] Updated CMS edit interface to include missing fields of Signup, Petition, and Callpower Snippets (#12826) --- .../wagtailpages/pagemodels/campaigns.py | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/network-api/networkapi/wagtailpages/pagemodels/campaigns.py b/network-api/networkapi/wagtailpages/pagemodels/campaigns.py index af1b92c185b..659c95a763f 100644 --- a/network-api/networkapi/wagtailpages/pagemodels/campaigns.py +++ b/network-api/networkapi/wagtailpages/pagemodels/campaigns.py @@ -74,6 +74,8 @@ class Meta: class CTA(CTABase): + panels = CTABase.panels + class Meta: ordering = ["-id"] verbose_name_plural = "CTA" @@ -136,6 +138,16 @@ class Callpower(TranslatableMixin, CTA): index.FilterField("locale_id"), ] + panels = CTA.panels + [ + FieldPanel("campaign_id"), + FieldPanel("call_button_label"), + FieldPanel("success_heading"), + FieldPanel("success_text"), + FieldPanel("share_twitter"), + FieldPanel("share_facebook"), + FieldPanel("share_email"), + ] + class Meta(TranslatableMixin.Meta): ordering = ["name"] verbose_name = "Callpower" @@ -166,6 +178,11 @@ class Signup(TranslatableMixin, CTA): index.FilterField("ask_name"), ] + panels = CTA.panels + [ + FieldPanel("campaign_id"), + FieldPanel("ask_name"), + ] + class Meta(TranslatableMixin.Meta): ordering = ["name"] verbose_name = "Signup" @@ -312,6 +329,17 @@ class Petition(TranslatableMixin, CTA): index.FilterField("show_comment_field"), ] + panels = CTA.panels + [ + FieldPanel("campaign_id"), + FieldPanel("show_country_field"), + FieldPanel("show_postal_code_field"), + FieldPanel("show_comment_field"), + FieldPanel("share_twitter"), + FieldPanel("share_facebook"), + FieldPanel("share_email"), + FieldPanel("thank_you"), + ] + class Meta(TranslatableMixin.Meta): ordering = ["-id"] verbose_name = "Petition" From 4875003e162773da06b98ea3ae9e8f7502b5fcbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20L=C3=B3pez?= <81331806+dlopezvsr@users.noreply.github.com> Date: Tue, 10 Sep 2024 11:57:32 -0600 Subject: [PATCH 2/3] Tp1 1033 migrate ga to gtm (#12744) * Replace GTM ID * Comment regarding container id added | GTM ID updated in mozfest base * Linting corrections: indentation * Update initial GTM setup - replace first ReactGA event: footer donate button * Files updated from ReactGA.event to dataLayer.push: primary nav, submission form, layout signup * Analytics events updated from ReactGA.event to dataLayer.push * Share vote tap events updated from ReactGA to GTM dataLayer.push * ReactGA module removal and events update for cta-button, header-donate, and social share * Footer social button event updated * home-banner, primary-button, and homepage events updated * homepage linting fix | participate donate, pulse profile, pulse profile list, and share button events updated * CTA download event updated | ReactGA module removed from not used files * Linting fixtures and integration tests * Conflicts fixed in merge with main * GTM ID correction after merged * Duplicated angle bracket corrected * csp_nonce template added to new inline script --- .../templates/mozfest/mozfest-base.html | 2 +- .../networkapi/templates/pages/base.html | 2 +- source/js/buyers-guide/analytics-events.js | 29 +++++++++++++++---- .../components/social-share/social-share.jsx | 8 +++-- .../footer-donate-button.js | 11 +++---- .../header-donate-button.js | 5 ++-- .../organisms/default-layout-signup.jsx | 4 +-- .../organisms/with-submission-logic.jsx | 17 ++++------- .../petition/petition-thank-you.jsx | 1 - .../template-js-handler/cta-button.js | 5 ++-- .../footer-social-button.js | 5 ++-- .../template-js-handler/home-banner.js | 5 ++-- .../template-js-handler/primary-button.js | 5 ++-- .../template-js-handler/cta-button.js | 5 ++-- .../template-js-handler/homepage.js | 8 ++--- .../participate-page-donate.js | 5 ++-- .../template-js-handler/pulse-profile-card.js | 13 ++++----- .../pulse-profile-list-filter.js | 6 ++-- .../template-js-handler/share-button-group.js | 4 +-- source/js/primary-nav.js | 8 ++--- 20 files changed, 80 insertions(+), 68 deletions(-) diff --git a/network-api/networkapi/mozfest/templates/mozfest/mozfest-base.html b/network-api/networkapi/mozfest/templates/mozfest/mozfest-base.html index e9f714204df..fc550b6e1f4 100644 --- a/network-api/networkapi/mozfest/templates/mozfest/mozfest-base.html +++ b/network-api/networkapi/mozfest/templates/mozfest/mozfest-base.html @@ -9,9 +9,9 @@ {% block ga_identifier %} - +