Skip to content

Commit

Permalink
Updated CMS edit interface to include missing fields of Signup, Petit…
Browse files Browse the repository at this point in the history
…ion, and Callpower Snippets (#12826)
  • Loading branch information
mmmavis authored Sep 10, 2024
1 parent 9eff52d commit f71d5a9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions network-api/networkapi/wagtailpages/pagemodels/campaigns.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ class Meta:


class CTA(CTABase):
panels = CTABase.panels

class Meta:
ordering = ["-id"]
verbose_name_plural = "CTA"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit f71d5a9

Please sign in to comment.