@@ -103,6 +103,10 @@ class NewsletterPageMixin(Page):
103
103
" will be sent immediately."
104
104
),
105
105
)
106
+ show_unsubscribe_link = models .BooleanField (
107
+ default = True ,
108
+ help_text = "If checked the footer contains an unsbscribe link." ,
109
+ )
106
110
web_version = models .BooleanField (
107
111
default = False ,
108
112
help_text = "If checked a web version of the newsletter will be published." ,
@@ -137,6 +141,7 @@ def get_newsletter_panels(cls):
137
141
),
138
142
FieldPanel ("newsletter_subject" , heading = "Subject" ),
139
143
FieldPanel ("newsletter_schedule_date" , heading = "Schedule" ),
144
+ FieldPanel ("show_unsubscribe_link" , heading = "Unsubscribe link" ),
140
145
FieldPanel ("web_version" , heading = "Web version" ),
141
146
NewsletterPanel (heading = "Campaign" ),
142
147
]
@@ -251,7 +256,7 @@ def get_newsletter_context(
251
256
"page" : self ,
252
257
"brand_settings" : brand_settings , # BrandSettings.load(request)
253
258
"email_settings" : email_settings , # EmailSettings.load(request)
254
- "contact" : contact ,
259
+ "contact" : self . show_unsubscribe_link and contact or None ,
255
260
"absolute_url" : absolute_url ,
256
261
}
257
262
0 commit comments