function themekey_ui_settings_form in ThemeKey 6.4
Same name and namespace in other branches
- 6.2 themekey_ui_admin.inc \themekey_ui_settings_form()
- 6.3 themekey_ui_admin.inc \themekey_ui_settings_form()
- 7.3 themekey_ui_admin.inc \themekey_ui_settings_form()
- 7 themekey_ui_admin.inc \themekey_ui_settings_form()
- 7.2 themekey_ui_admin.inc \themekey_ui_settings_form()
ThemeKey UI settings form
See also
themekey_ui_settings_form_submit()
1 string reference to 'themekey_ui_settings_form'
- themekey_ui_menu in ./
themekey_ui.module - Implements hook_menu().
File
- ./
themekey_ui_admin.inc, line 27
Code
function themekey_ui_settings_form() {
$form['themekey_ui'] = array(
'#type' => 'fieldset',
'#title' => t('UI Settings'),
'#collapsible' => FALSE,
'#collapsed' => FALSE,
);
if (module_exists('path')) {
$form['themekey_ui']['themekey_ui_pathalias'] = array(
'#type' => 'checkbox',
'#title' => t('Show theme option in the \'URL aliases\' administration'),
'#default_value' => variable_get('themekey_ui_pathalias', 0),
'#description' => t('Assign themes to paths/path aliases from the \'URL aliases\' administration pages.'),
);
}
//
$nodeform = variable_get('themekey_ui_nodeform', 0);
$form['themekey_ui']['themekey_ui_nodeform'] = array(
'#type' => 'checkbox',
'#title' => t('Show theme option in create/edit node forms'),
'#default_value' => $nodeform,
'#description' => t('Assign themes from create/edit node forms. This will show a \'Theme\' section on create/edit node pages.'),
);
if ($nodeform) {
$form['themekey_ui']['content_type'] = array(
'#type' => 'fieldset',
'#title' => t('Show \'Theme\' option for nodes of type'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['themekey_ui']['content_type']['table'] = array(
'#theme' => 'themekey_ui_table',
'#header' => array(
t('Content Type'),
t('Enabled'),
),
);
foreach (node_get_types('names') as $type => $title) {
$form['themekey_ui']['content_type']['table'][$type]['title'] = array(
'#value' => $title,
);
$form['themekey_ui']['content_type']['table'][$type]['themekey_ui_nodeform|' . $type] = array(
'#type' => 'checkbox',
'#default_value' => variable_get('themekey_ui_nodeform|' . $type, 1),
);
}
}
$form['themekey_ui']['themekey_ui_author'] = array(
'#type' => 'checkbox',
'#title' => t('Show theme option in user profile'),
'#default_value' => variable_get('themekey_ui_author', 0),
'#description' => t('Assign themes from user profile. All nodes created by a user will be shown to all visitors using the theme she selected in her profile.'),
);
$form['buttons']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
return $form;
}