Skip to content
Snippets Groups Projects
Commit 964ef1cf authored by Lily Yan's avatar Lily Yan
Browse files

ISTWCMS-6545 Create an admin-only option to remove the 'on this site' search

parent a60fa1cf
No related branches found
No related tags found
1 merge request!110ISTWCMS-6545 Create search options
...@@ -165,7 +165,10 @@ function uw_fdsu_theme_resp_preprocess_region(&$variables) { ...@@ -165,7 +165,10 @@ function uw_fdsu_theme_resp_preprocess_region(&$variables) {
// Get the region from variables. // Get the region from variables.
$region = $variables['elements']['#region']; $region = $variables['elements']['#region'];
// Set 'search_local' variable if not set.
if (!isset($variables['search_local'])) {
$variables['search_local'] = theme_get_setting('search_show_local', 'uw_fdsu_theme_resp');
}
// Variables that we want to have access to regardless of region. // Variables that we want to have access to regardless of region.
$variables['branding_level'] = theme_get_setting('wcms_branding_level', 'uw_fdsu_theme_resp') ? theme_get_setting('wcms_branding_level', 'uw_fdsu_theme_resp') : 'full'; $variables['branding_level'] = theme_get_setting('wcms_branding_level', 'uw_fdsu_theme_resp') ? theme_get_setting('wcms_branding_level', 'uw_fdsu_theme_resp') : 'full';
// The menu style is set based on selection if the level is 'full'. // The menu style is set based on selection if the level is 'full'.
...@@ -249,6 +252,20 @@ function uw_fdsu_theme_resp_form_system_theme_settings_alter(&$form, FormStateIn ...@@ -249,6 +252,20 @@ function uw_fdsu_theme_resp_form_system_theme_settings_alter(&$form, FormStateIn
return; return;
} }
// Fieldset for search options.
$form['search_options'] = [
'#type' => 'details',
'#open' => TRUE,
'#title' => t('Search options'),
];
// Search options checkbox field.
$form['search_options']['search_show_local'] = [
'#type' => 'checkbox',
'#title' => t("Show the 'on this site' search option"),
'#default_value' => theme_get_setting('search_show_local', 'uw_fdsu_theme_resp') ?? TRUE,
];
// Fieldset for colour scheme. // Fieldset for colour scheme.
$form['colour_scheme'] = [ $form['colour_scheme'] = [
'#type' => 'details', '#type' => 'details',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment