From fa99ae3fa733816259cde0f5efc67574239b9bac Mon Sep 17 00:00:00 2001 From: Lily Yan <l26yan@uwaterloo.ca> Date: Fri, 19 Aug 2022 10:21:44 -0400 Subject: [PATCH] ISTWCMS-5686 Refactor to ensure that the contained width is selected by default due to new feature from 2.0.0 --- uw_cfg_common.module | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/uw_cfg_common.module b/uw_cfg_common.module index 7c4575c5..dcf49899 100644 --- a/uw_cfg_common.module +++ b/uw_cfg_common.module @@ -178,11 +178,8 @@ function uw_cfg_common_entity_presave(EntityInterface $entity) { * Remove the None option from layout builder styles. */ function uw_cfg_common_form_layout_builder_configure_section_alter(array &$form, FormStateInterface $form_state, string $form_id): void { - // Remove the None option from layout builder styles. - unset($form['layout_builder_style']['#empty_option']); - // Ensuring that the contained width is selected by default. - $form['layout_builder_style']['#default_value'] = $form['layout_builder_style']['#default_value'] ?: 'uw_lbs_contained_width'; + $form['layout_builder_style_default']['#default_value']['uw_lbs_contained_width'] = 'uw_lbs_contained_width'; } /** -- GitLab