Skip to content

Commit a0957a2

Browse files
committed
Create Smart Window instructions block
1 parent d59d8d0 commit a0957a2

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

springfield/cms/blocks.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,16 @@ class Meta:
10771077
template = "cms/blocks/media.html"
10781078

10791079

1080+
class SmartWindowInstructionsBlock(blocks.StructBlock):
1081+
heading = HeadingBlock()
1082+
instructions = blocks.RichTextBlock(features=HEADING_TEXT_FEATURES, label="Instructions")
1083+
1084+
class Meta:
1085+
label = "Smart Window Instructions"
1086+
label_format = "Smart Window Instructions - {instructions}"
1087+
template = "cms/blocks/smart-window-instructions.html"
1088+
1089+
10801090
class MediaContentSettings(blocks.StructBlock):
10811091
media_after = blocks.BooleanBlock(
10821092
required=False,
@@ -1113,6 +1123,7 @@ class _MediaContentBlock(blocks.StructBlock):
11131123
content = blocks.StreamBlock(
11141124
[
11151125
("rich_text", blocks.RichTextBlock(features=HEADING_TEXT_FEATURES)),
1126+
("smart_window_instructions", SmartWindowInstructionsBlock()),
11161127
]
11171128
)
11181129
buttons = MixedButtonsBlock(
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{#
2+
This Source Code Form is subject to the terms of the Mozilla Public
3+
License, v. 2.0. If a copy of the MPL was not distributed with this
4+
file, You can obtain one at https://mozilla.org/MPL/2.0/.
5+
#}
6+
7+
<div class="fl-smart-window-instructions">
8+
<div class="fl-smart-window-instructions-heading">
9+
{% include_block value.heading %}
10+
</div>
11+
<div class="fl-smart-window-instructions-body">
12+
{{ value.instructions|richtext }}
13+
</div>
14+
</div>

0 commit comments

Comments
 (0)