-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b244eee
commit 5b8a650
Showing
4 changed files
with
750 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from django.conf import settings | ||
|
||
from wagtail import blocks | ||
|
||
from .document import DocumentsBlock | ||
from .paragraph import APIRichTextBlock | ||
from .tables import TableBlock | ||
|
||
|
||
class AccordionContentBlock(blocks.StreamBlock): | ||
text = APIRichTextBlock( | ||
required=True, features=settings.RESTRICTED_RICH_TEXT_FEATURES | ||
) | ||
table = TableBlock() | ||
documents = DocumentsBlock() | ||
|
||
class Meta: | ||
icon = "list-ul" | ||
label = "Body" | ||
|
||
|
||
class AccordionBlock(blocks.StructBlock): | ||
title = blocks.CharBlock(required=True) | ||
body = AccordionContentBlock() | ||
|
||
class Meta: | ||
icon = "list-ul" | ||
label = "Accordion Item" | ||
|
||
|
||
class AccordionsBlock(blocks.StructBlock): | ||
items = blocks.ListBlock(AccordionBlock()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.