From e8bdf4279cd55aec20ae912768deedbef6375995 Mon Sep 17 00:00:00 2001 From: Liam Morland <lkmorlan@uwaterloo.ca> Date: Thu, 30 Jul 2020 14:58:06 -0400 Subject: [PATCH] ISTWCMS-2509: Move Webform configuration from uw_sites_all --- uw_cfg_common.module | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/uw_cfg_common.module b/uw_cfg_common.module index ce40c1fc..a18a5645 100644 --- a/uw_cfg_common.module +++ b/uw_cfg_common.module @@ -19,3 +19,17 @@ function uw_cfg_common_form_layout_builder_configure_section_alter(array &$form, // Ensuring that the contained width is selected by default. $form['layout_builder_style']['#default_value'] = $form['layout_builder_style']['#default_value'] ?: 'uw-contained-width'; } + +/** + * Implements hook_form_FORM_ID_alter(). + */ +function uw_cfg_common_form_webform_settings_confirmation_form_alter(array &$form, FormStateInterface $form_state, string $form_id): void { + // Remove undesirable Webform submission confirmation types. These appear on + // admin/structure/webform/manage/*/settings/confirmation. + // The 'modal' type is just a different way to display the message. Disable + // for consistency. + unset($form['confirmation_type']['confirmation_type']['#options']['modal']); + // The 'none' type is only useful along with a custom handler which provides + // the confirmation message. + unset($form['confirmation_type']['confirmation_type']['#options']['none']); +} -- GitLab