|
8 | 8 | from app.core.models import LinkOrPageBlock
|
9 | 9 |
|
10 | 10 |
|
| 11 | +class CodeOfConductPage(Page): |
| 12 | + max_count = 1 |
| 13 | + |
| 14 | + intro = RichTextField(blank=True) |
| 15 | + |
| 16 | + short_version_title = models.CharField(default="Short Version") |
| 17 | + short_version_body = RichTextField(blank=True) |
| 18 | + |
| 19 | + full_version_title = models.CharField(default="Full Version") |
| 20 | + full_version_body = RichTextField(blank=True) |
| 21 | + |
| 22 | + complaint_handling_title = models.CharField(default="Complaint Handling Process") |
| 23 | + complaint_handling_body = RichTextField(blank=True) |
| 24 | + |
| 25 | + our_policies_title = models.CharField(default="Our Policies") |
| 26 | + our_policies_links = StreamField([ |
| 27 | + ('blocks', StructBlock([ |
| 28 | + ('text', CharBlock()), |
| 29 | + ('link', LinkOrPageBlock()) |
| 30 | + ])) |
| 31 | + ], use_json_field=True, null=True, blank=True, help_text="Links to be shown under the Our Policies section.") |
| 32 | + |
| 33 | + question_block_title = models.CharField(default="Have a question about the code of conduct?") |
| 34 | + question_block_button_text = models.CharField(default="Contact Community Working Group") |
| 35 | + question_block_button_link = StreamField(LinkOrPageBlock(), use_json_field=True, blank=True) |
| 36 | + |
| 37 | + content_panels = Page.content_panels + [ |
| 38 | + MultiFieldPanel([ |
| 39 | + FieldPanel('intro'), |
| 40 | + FieldPanel('short_version_title'), |
| 41 | + FieldPanel('short_version_body'), |
| 42 | + FieldPanel('full_version_title'), |
| 43 | + FieldPanel('full_version_body'), |
| 44 | + FieldPanel('complaint_handling_title'), |
| 45 | + FieldPanel('complaint_handling_body'), |
| 46 | + ], heading="Body"), |
| 47 | + MultiFieldPanel([ |
| 48 | + FieldPanel('our_policies_title'), |
| 49 | + FieldPanel('our_policies_links'), |
| 50 | + FieldPanel('question_block_title'), |
| 51 | + FieldPanel('question_block_button_text'), |
| 52 | + FieldPanel('question_block_button_link'), |
| 53 | + ], heading="Sidebar"), |
| 54 | + ] |
| 55 | + |
| 56 | + |
| 57 | +class PrivacyPolicyPage(Page): |
| 58 | + max_count = 1 |
| 59 | + |
| 60 | + intro = RichTextField(blank=True) |
| 61 | + brief_body_text = RichTextField(blank=True) |
| 62 | + table_of_contents_title = models.CharField(default="This Privacy Policy Contains the Following Sections:") |
| 63 | + body_sections = StreamField([ |
| 64 | + ('blocks', StructBlock([ |
| 65 | + ('title', CharBlock()), |
| 66 | + ('body', RichTextBlock()) |
| 67 | + ])) |
| 68 | + ], use_json_field=True, null=True, blank=True, help_text="Sections to be shown in the body following the table of contents; these sections will automatically populate the table of contents.") |
| 69 | + |
| 70 | + our_policies_title = models.CharField(default="Our Policies") |
| 71 | + our_policies_links = StreamField([ |
| 72 | + ('blocks', StructBlock([ |
| 73 | + ('text', CharBlock()), |
| 74 | + ('link', LinkOrPageBlock()) |
| 75 | + ])) |
| 76 | + ], use_json_field=True, null=True, blank=True, help_text="Links to be shown under the Our Policies section.") |
| 77 | + |
| 78 | + question_block_title = models.CharField(default="Have a question about the privacy policy?") |
| 79 | + question_block_button_text = models.CharField(default="Contact HOT") |
| 80 | + question_block_button_link = StreamField(LinkOrPageBlock(), use_json_field=True, blank=True) |
| 81 | + |
| 82 | + content_panels = Page.content_panels + [ |
| 83 | + MultiFieldPanel([ |
| 84 | + FieldPanel('intro'), |
| 85 | + FieldPanel('brief_body_text'), |
| 86 | + FieldPanel('table_of_contents_title'), |
| 87 | + FieldPanel('body_sections'), |
| 88 | + ], heading="Body"), |
| 89 | + MultiFieldPanel([ |
| 90 | + FieldPanel('our_policies_title'), |
| 91 | + FieldPanel('our_policies_links'), |
| 92 | + FieldPanel('question_block_title'), |
| 93 | + FieldPanel('question_block_button_text'), |
| 94 | + FieldPanel('question_block_button_link'), |
| 95 | + ], heading="Sidebar"), |
| 96 | + ] |
| 97 | + |
| 98 | + |
11 | 99 | class JoinOurConversationPage(Page):
|
12 | 100 | max_count = 1
|
13 | 101 |
|
|
0 commit comments