Last active
May 29, 2026 01:52
-
-
Save cbiggins/a75709b9ed5c71c02c27a4d4edeea8ff to your computer and use it in GitHub Desktop.
3589091-civictheme-webform-container-theme-suggestion.patch
This file contains hidden or 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
| From 4e24151821a8f7b166b75e2628c1b291fa735e67 Mon Sep 17 00:00:00 2001 | |
| From: richardgaunt <57734756+richardgaunt@users.noreply.github.com> | |
| Date: Fri, 15 May 2026 12:11:55 +1000 | |
| Subject: [PATCH] Fixed theme suggestion name for webform container. (#1517) | |
| Paths stripped from monorepo prefix for composer-patches compatibility. | |
| Template rename converted to delete+create. | |
| --- | |
| diff --git a/civictheme.theme b/civictheme.theme | |
| --- a/civictheme.theme | |
| +++ b/civictheme.theme | |
| @@ -134,7 +134,7 @@ | |
| if (!civictheme_is_webform_element($variables['element'])) { | |
| return; | |
| } | |
| - $suggestions[] = 'webform__container'; | |
| + $suggestions[] = 'container__webform_container'; | |
| } | |
| /** | |
| diff --git a/includes/webform.inc b/includes/webform.inc | |
| --- a/includes/webform.inc | |
| +++ b/includes/webform.inc | |
| @@ -43,9 +43,9 @@ | |
| } | |
| /** | |
| - * Implements hook_preprocess_webform__container(). | |
| + * Implements hook_preprocess_container__webform_container(). | |
| */ | |
| -function civictheme_preprocess_webform__container(array &$variables): void { | |
| +function civictheme_preprocess_container__webform_container(array &$variables): void { | |
| if (!civictheme_is_webform_element($variables['element'])) { | |
| return; | |
| } | |
| diff --git a/templates/webform/webform--container.html.twig b/templates/webform/webform--container.html.twig | |
| deleted file mode 100644 | |
| --- a/templates/webform/webform--container.html.twig | |
| +++ /dev/null | |
| @@ -1,8 +0,0 @@ | |
| -{% include 'civictheme:basic-content' with { | |
| - theme: theme|default('light'), | |
| - is_contained: is_contained|default(true), | |
| - vertical_spacing: vertical_spacing|default('none'), | |
| - with_background: with_background|default(false), | |
| - modifier_class: modifier_class|default(''), | |
| - content: content, | |
| -} %} | |
| diff --git a/templates/webform/container--webform-container.html.twig b/templates/webform/container--webform-container.html.twig | |
| new file mode 100644 | |
| --- /dev/null | |
| +++ b/templates/webform/container--webform-container.html.twig | |
| @@ -0,0 +1,8 @@ | |
| +{% include 'civictheme:basic-content' with { | |
| + theme: theme|default('light'), | |
| + is_contained: is_contained|default(true), | |
| + vertical_spacing: vertical_spacing|default('none'), | |
| + with_background: with_background|default(false), | |
| + modifier_class: modifier_class|default(''), | |
| + content: content, | |
| +} %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment