Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

People List Filter Labels as a Global Setting #35

Merged
merged 2 commits into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/SiteConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,26 @@ public function buildThemeSettingsForm(array &$form, FormStateInterface &$form_s
],
'#description' => $this->t('Select the preferred Global Date/Time format for dates on your site.'),
];
// Custom labels for filters 1-3 on People List Pages
$form['ucb_filter_1_label'] = [
'#type' => 'textfield',
'#title' => $this->t('Filter 1 Label'),
'#default_value' => theme_get_setting('ucb_filter_1_label', $themeName),
'#description' => $this->t('Choose the label that will be used for "Filter 1" on People List Pages'),
];
$form['ucb_filter_2_label'] = [
'#type' => 'textfield',
'#title' => $this->t('Filter 2 Label'),
'#default_value' => theme_get_setting('ucb_filter_2_label', $themeName),
'#description' => $this->t('Choose the label that will be used for "Filter 2" on People List Pages'),
];
$form['ucb_filter_3_label'] = [
'#type' => 'textfield',
'#title' => $this->t('Filter 3 Label'),
'#default_value' => theme_get_setting('ucb_filter_3_label', $themeName),
'#description' => $this->t('Choose the label that will be used for "Filter 3" on People List Pages'),
];

if ($this->user->hasPermission('edit ucb site advanced')) {
$form['advanced'] = [
'#type' => 'details',
Expand Down