function getlocations_tools_import_form in Get Locations 7
Same name and namespace in other branches
- 7.2 modules/getlocations_tools/getlocations_tools.module \getlocations_tools_import_form()
1 string reference to 'getlocations_tools_import_form'
- getlocations_tools_menu in modules/
getlocations_tools/ getlocations_tools.module - Implements hook_menu().
File
- modules/
getlocations_tools/ getlocations_tools.module, line 192 - getlocations_tools.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_tools_import_form($form, &$form_state) {
$import_select = variable_get('getlocations_tools_import_select', 0);
variable_del('getlocations_tools_import_select');
$form = array();
$opts = getlocations_tools_get_options();
if (count($opts) > 1) {
$form['getlocations_tools_import_select'] = getlocations_element_dd(t('Configuration settings'), $import_select, $opts, t('Which configuration settings to import.'));
$title = t('None selected');
$select = FALSE;
if ($import_select == 1) {
$title = t('Paste Getlocations settings here');
$select = TRUE;
}
elseif ($import_select == 2) {
$title = t('Paste Getlocations Fields settings here');
$select = TRUE;
}
elseif ($import_select == 3) {
$title = t('Paste Getlocations Search settings here');
$select = TRUE;
}
elseif ($import_select == 4) {
$title = t('Paste Getlocations Leaflet settings here');
$select = TRUE;
}
$form['getlocations_tools_import_content'] = array(
'#type' => 'textarea',
'#title' => $title,
'#rows' => 15,
);
$form['getlocations_tools_import_submit'] = array(
'#type' => 'submit',
'#value' => $select ? t('Import') : t('Select'),
);
return $form;
}
}