From 6f8a3859e30a1c6dff148ec560273320ab5af3dd Mon Sep 17 00:00:00 2001 From: Lily Yan <l26yan@uwaterloo.ca> Date: Tue, 28 Feb 2023 13:12:47 -0500 Subject: [PATCH] ISTWCMS-6195 Refactor generic nolink/button link field function in uw_cfg_common.module, using custom description for timeline link field --- uw_cfg_common.module | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/uw_cfg_common.module b/uw_cfg_common.module index 1be33c42..30b46c0e 100644 --- a/uw_cfg_common.module +++ b/uw_cfg_common.module @@ -1804,6 +1804,11 @@ function uw_cfg_common_field_widget_single_element_link_default_form_alter(array if ($field_definition->getName() == 'field_uw_event_host') { $element['uri']['#description'] .= ' ' . t('Enter <nolink> to display link text only.'); } + + // Set custom description only for timeline link field. + if ($field_definition->getName() == 'field_uw_timeline_link') { + $element['uri']['#description'] = t('Links the entire content to a URL. If entered, do not use links inside the content itself.') . ' ' . $element['uri']['#description']; + } } // Add link uri field element validation function. -- GitLab