From 6f8f3b0956fb725c8e1eb18c35ce0b36d3ecd74f Mon Sep 17 00:00:00 2001 From: vincent-gao Date: Fri, 20 Sep 2024 10:34:56 +1000 Subject: [PATCH] [SD-174] Enable webform_wizard_page for Tide core (#110) --- config/optional/webform.settings.yml | 1 - src/TideOperation.php | 1 - tide_webform.install | 11 +++++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/config/optional/webform.settings.yml b/config/optional/webform.settings.yml index 6f07443..20f1662 100644 --- a/config/optional/webform.settings.yml +++ b/config/optional/webform.settings.yml @@ -170,7 +170,6 @@ element: webform_time: webform_time webform_variant: webform_variant webform_video_file: webform_video_file - webform_wizard_page: webform_wizard_page html_editor: disabled: false format: '' diff --git a/src/TideOperation.php b/src/TideOperation.php index 582dac7..68e7fab 100644 --- a/src/TideOperation.php +++ b/src/TideOperation.php @@ -74,7 +74,6 @@ public static function installWebformConfig() { 'webform_time', 'webform_variant', 'webform_video_file', - 'webform_wizard_page', ]; $config_factory = \Drupal::configFactory(); $config = $config_factory->getEditable('webform.settings'); diff --git a/tide_webform.install b/tide_webform.install index 61b09c5..e791e26 100644 --- a/tide_webform.install +++ b/tide_webform.install @@ -14,3 +14,14 @@ function tide_webform_install() { TideOperation::installWebformConfig(); TideOperation::accessTextEditorInWebform(); } + +/** + * Enables webform_wizard_page element. + */ +function tide_webform_update_10001() { + $config = \Drupal::configFactory()->getEditable('webform.settings'); + $excluded_elements_value = $config->get('element.excluded_elements'); + unset($excluded_elements_value['webform_wizard_page']); + $config->set('element.excluded_elements', $excluded_elements_value); + $config->save(); +}