From 61a78dcbf437a1e621b59a23d1d2e13ec1396969 Mon Sep 17 00:00:00 2001 From: nmiyazaki-chapleau Date: Tue, 4 Jun 2024 09:27:40 -0400 Subject: [PATCH 1/2] Basic implementation that changes the Blocks formwidget to extend MLRepeater and customizes the getLocaleSaveData to add the _group and _config to the save data. Also changes all blocks to use the Translate version (ml*) --- blocks/button.block | 2 +- blocks/image.block | 4 ++-- blocks/plaintext.block | 2 +- blocks/richtext.block | 2 +- blocks/title.block | 2 +- blocks/video.block | 2 +- blocks/vimeo.block | 2 +- blocks/youtube.block | 2 +- formwidgets/Blocks.php | 47 ++++++++++++++++++++++++++++++++++++++++-- 9 files changed, 54 insertions(+), 11 deletions(-) diff --git a/blocks/button.block b/blocks/button.block index 5a25ded..e746516 100644 --- a/blocks/button.block +++ b/blocks/button.block @@ -11,7 +11,7 @@ fields: label: label: winter.blocks::lang.fields.label span: full - type: text + type: mltext tabs: icons: winter.blocks::lang.fields.actions: 'icon-arrow-pointer' diff --git a/blocks/image.block b/blocks/image.block index 81494aa..0b522af 100644 --- a/blocks/image.block +++ b/blocks/image.block @@ -4,13 +4,13 @@ icon: icon-picture-o tags: ["pages"] fields: image: - type: mediafinder + type: mlmediafinder span: full mode: image alt_text: label: winter.blocks::lang.blocks.image.alt_text span: full - type: text + type: mltext config: size: label: winter.blocks::lang.fields.size diff --git a/blocks/plaintext.block b/blocks/plaintext.block index f80f679..e82e826 100644 --- a/blocks/plaintext.block +++ b/blocks/plaintext.block @@ -6,7 +6,7 @@ fields: content: placeholder: winter.blocks::lang.fields.content span: full - type: textarea + type: mltextarea size: small ==

diff --git a/blocks/richtext.block b/blocks/richtext.block index 728a561..f9a0275 100644 --- a/blocks/richtext.block +++ b/blocks/richtext.block @@ -6,7 +6,7 @@ fields: content: placeholder: winter.blocks::lang.fields.content span: full - type: richeditor + type: mlricheditor ==

{{ content | raw }} diff --git a/blocks/title.block b/blocks/title.block index ce43dc2..b77ee79 100644 --- a/blocks/title.block +++ b/blocks/title.block @@ -6,7 +6,7 @@ fields: content: placeholder: winter.blocks::lang.blocks.title.name span: full - type: text + type: mltext config: size: label: winter.blocks::lang.fields.size diff --git a/blocks/video.block b/blocks/video.block index 1bc6979..e2a1d03 100644 --- a/blocks/video.block +++ b/blocks/video.block @@ -6,7 +6,7 @@ fields: video: label: winter.blocks::lang.blocks.video.name span: full - type: mediafinder + type: mlmediafinder mode: video == {% if video %} diff --git a/blocks/vimeo.block b/blocks/vimeo.block index 2fd678e..90e3b7f 100644 --- a/blocks/vimeo.block +++ b/blocks/vimeo.block @@ -5,7 +5,7 @@ tags: ["pages"] fields: vimeo_id: label: winter.blocks::lang.blocks.vimeo.vimeo_id - type: text + type: mltext == {% if vimeo_id %}