Révision e5461e73
Ajouté par Julien Enselme il y a environ 9 ans
drupal7/sites/all/themes/rubik/theme-settings.php | ||
---|---|---|
17 | 17 |
'#type' => 'fieldset', |
18 | 18 |
'#title' => t('Rubik'), |
19 | 19 |
); |
20 |
$form['rubik']['rubik_show_branding'] = array( |
|
21 |
'#type' => 'checkbox', |
|
22 |
'#title' => t('Show branding'), |
|
23 |
'#description' => t('Display the "branding" line at the top of the page with breadcrumbs and secondary menu.'), |
|
24 |
'#default_value' => theme_get_setting('rubik_show_branding', 'rubik'), |
|
25 |
); |
|
20 | 26 |
$form['rubik']['rubik_inline_field_descriptions'] = array( |
21 | 27 |
'#type' => 'checkbox', |
22 | 28 |
'#title' => t('Display form field descriptions inline.'), |
23 | 29 |
'#description' => t("By default, each field's description is displayed in a pop-up, which is only visible when hovering over that field. Select this option to make all field descriptions visible at all times."), |
24 | 30 |
'#default_value' => theme_get_setting('rubik_inline_field_descriptions', 'rubik'), |
25 | 31 |
); |
26 |
} |
|
32 |
$form['rubik']['rubik_disable_sticky_sidebar'] = array( |
|
33 |
'#type' => 'checkbox', |
|
34 |
'#title' => t('Disable sticky sidebar'), |
|
35 |
'#description' => t("By default, the sidebar will fix itself when scrolling down a form. If you have a lot of fields in the sidebar, consider disabling the sticky sidebar to view them all."), |
|
36 |
'#default_value' => theme_get_setting('rubik_disable_sticky_sidebar', 'rubik'), |
|
37 |
); |
|
38 |
$form['rubik']['rubik_disable_sidebar_in_form'] = array( |
|
39 |
'#type' => 'checkbox', |
|
40 |
'#title' => t('Disable sidebar in forms'), |
|
41 |
'#description' => t("By default, the sidebar is enabled for forms."), |
|
42 |
'#default_value' => theme_get_setting('rubik_disable_sidebar_in_form', 'rubik'), |
|
43 |
); |
|
44 |
$form['rubik']['rubik_sidebar_field_ui'] = array( |
|
45 |
'#type' => 'checkbox', |
|
46 |
'#title' => t('Display fields in the sidebar of the node edit form.'), |
|
47 |
'#description' => t("By default, each field is displayed in the main content area of the node edit form. This option allows you to move fields into the sidebar to improve user experience."), |
|
48 |
'#default_value' => theme_get_setting('rubik_sidebar_field_ui', 'rubik'), |
|
49 |
'#states' => array( |
|
50 |
'invisible' => array( |
|
51 |
':input[name="rubik_disable_sidebar_in_form"]' => array('checked' => TRUE), |
|
52 |
), |
|
53 |
), |
|
54 |
); |
|
55 |
|
|
56 |
// If the sidebar is disabled, we need to disable the sidebar field ui as well. |
|
57 |
$rubik_disable_sidebar_in_form = theme_get_setting('rubik_disable_sidebar_in_form', 'rubik'); |
|
58 |
if ($rubik_disable_sidebar_in_form == 1) { |
|
59 |
$form['rubik']['rubik_sidebar_field_ui']['#default_value'] = 0; |
|
60 |
} |
|
61 |
|
|
62 |
// Rebuild theme registry on form save. |
|
63 |
if (!empty($form_state)) { |
|
64 |
// Rebuild .info data. |
|
65 |
system_rebuild_theme_data(); |
|
66 |
// Rebuild theme registry. |
|
67 |
drupal_theme_rebuild(); |
|
68 |
} |
|
69 |
|
|
70 |
} |
Formats disponibles : Unified diff
Update Rubik 4.0-rc1 4.2