From f71d5a9729f1c75816e15350888e555576c06ffa Mon Sep 17 00:00:00 2001 From: Mavis Ou Date: Tue, 10 Sep 2024 09:56:27 -0700 Subject: [PATCH] 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"