function skinr_ui_import_form in Skinr 6.2
Same name and namespace in other branches
- 7.2 skinr_ui.admin.inc \skinr_ui_import_form()
Skinr settings import form.
1 string reference to 'skinr_ui_import_form'
- skinr_ui_menu in ./
skinr_ui.module - Implementation of hook_menu().
File
- ./
skinr_ui.admin.inc, line 687 - Admin page callbacks for the skinr module.
Code
function skinr_ui_import_form(&$form_state) {
$form = array();
$options = array();
$themes = list_themes();
ksort($themes);
$current_theme = skinr_current_theme(TRUE);
// Put default theme at the top.
$options[$current_theme] = $themes[$current_theme]->info['name'] . ' [' . t('default') . ']';
foreach ($themes as $theme) {
if ($theme->name == $current_theme) {
// Do nothing.
}
elseif ($theme->status) {
$options[$theme->name] = $theme->info['name'] . ' [' . t('enabled') . ']';
}
else {
$options[$theme->name] = $theme->info['name'];
}
}
$form['theme'] = array(
'#type' => 'select',
'#title' => t('Theme'),
'#options' => $options,
'#required' => TRUE,
);
$form['skinr_settings'] = array(
'#type' => 'textarea',
'#title' => t('Skinr settings'),
'#description' => t('Paste skinr settings here.'),
'#rows' => 16,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Import'),
);
return $form;
}