File tree Expand file tree Collapse file tree 2 files changed +19
-21
lines changed
web/themes/custom/fds_faxe_theme Expand file tree Collapse file tree 2 files changed +19
-21
lines changed Original file line number Diff line number Diff line change @@ -9,27 +9,6 @@ use Drupal\taxonomy\Entity\Term;
9
9
10
10
11
11
12
- function fds_faxe_theme_form_system_theme_settings_alter(&$form, FormStateInterface $form_state, $form_id) {
13
- // Add a vertical tab for custom theme settings.
14
- $form['fds_faxe_theme_settings'] = [
15
- '#type' => 'vertical_tabs',
16
- '#title' => t('Banner Search settings'),
17
- '#weight' => -10,
18
- ];
19
-
20
- // Add the image upload field.
21
- $form['fds_faxe_theme_settings']['fds_faxe_theme_background_image'] = [
22
- '#type' => 'managed_file',
23
- '#title' => t('Background Image'),
24
- '#description' => t('Upload the background image for the block.'),
25
- '#default_value' => theme_get_setting('fds_faxe_theme_background_image'),
26
- '#upload_location' => 'public://fds_faxe_theme/background-images/',
27
- '#upload_validators' => [
28
- 'file_validate_extensions' => ['png gif jpg jpeg'],
29
- ],
30
- ];
31
- }
32
-
33
12
34
13
35
14
Original file line number Diff line number Diff line change @@ -35,4 +35,23 @@ function fds_faxe_theme_form_system_theme_settings_alter(
35
35
'#title ' => t ('Tekst ' ),
36
36
'#default_value ' => theme_get_setting ('branding_text ' ),
37
37
];
38
+
39
+ // Add a vertical tab for custom theme settings.
40
+ $ form ['fds_faxe_theme_settings ' ] = [
41
+ '#type ' => 'vertical_tabs ' ,
42
+ '#title ' => t ('Banner Search settings ' ),
43
+ '#weight ' => -10 ,
44
+ ];
45
+
46
+ // Add the image upload field.
47
+ $ form ['fds_faxe_theme_settings ' ]['fds_faxe_theme_background_image ' ] = [
48
+ '#type ' => 'managed_file ' ,
49
+ '#title ' => t ('Background Image ' ),
50
+ '#description ' => t ('Upload the background image for the block. ' ),
51
+ '#default_value ' => theme_get_setting ('fds_faxe_theme_background_image ' ),
52
+ '#upload_location ' => 'public://fds_faxe_theme/background-images/ ' ,
53
+ '#upload_validators ' => [
54
+ 'file_validate_extensions ' => ['png gif jpg jpeg ' ],
55
+ ],
56
+ ];
38
57
}
You can’t perform that action at this time.
0 commit comments