From c79b669264d5c094bf24ee441bc46c7a057e9ccd Mon Sep 17 00:00:00 2001 From: Lily Yan <l26yan@uwaterloo.ca> Date: Thu, 3 Nov 2022 10:39:23 -0400 Subject: [PATCH] ISTWCMS-5885 Remove ability to set CSS classes, CSS styles and custom attributes (YAML) for webform elements --- uw_cfg_common.module | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/uw_cfg_common.module b/uw_cfg_common.module index e1e447c2..b63253a8 100644 --- a/uw_cfg_common.module +++ b/uw_cfg_common.module @@ -192,6 +192,15 @@ function uw_cfg_common_form_webform_admin_config_submissions_form_alter(array &$ $form['views_settings']['#access'] = FALSE; } +/** + * Implements hook_form_FORM_ID_alter(). + * + * Remove wrapper attributes in admin/structure/webform/manage/{webform_id}. + */ +function uw_cfg_common_form_webform_ui_element_form_alter(array &$form, FormStateInterface $form_state, string $form_id): void { + $form['properties']['wrapper_attributes']['#access'] = FALSE; +} + /** * Implements hook_form_FORM_ID_alter(). * -- GitLab