function hierarchical_select_admin_import in Hierarchical Select 6.3
Same name and namespace in other branches
- 5.3 hierarchical_select.admin.inc \hierarchical_select_admin_import()
- 7.3 hierarchical_select.admin.inc \hierarchical_select_admin_import()
Form definition; config import form.
1 string reference to 'hierarchical_select_admin_import'
- hierarchical_select_menu in ./
hierarchical_select.module - Implementation of hook_menu().
File
- ./
hierarchical_select.admin.inc, line 175 - Module settings and configuration administration UI.
Code
function hierarchical_select_admin_import(&$form_state, $config_id) {
require_once drupal_get_path('module', 'hierarchical_select') . '/includes/common.inc';
drupal_add_css(drupal_get_path('module', 'hierarchical_select') . '/hierarchical_select.css');
drupal_add_js('$(document).ready(function() { $(".hierarchical-select-code").focus(); });', 'inline');
$form['config'] = array(
'#type' => 'textarea',
'#title' => t('Import Hierarchical Select configuration code'),
'#cols' => 60,
'#rows' => 15,
'#description' => t('Copy and paste the results of an exported
Hierarchical Select configuration here.<br />This will override the
current Hierarchical Select configuration for %config_id.', array(
'%config_id' => $config_id,
)),
'#attributes' => array(
'class' => 'hierarchical-select-config-code',
),
);
$form['interpreted_config'] = array(
'#type' => 'value',
'#value' => NULL,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t("Import"),
);
$form['#redirect'] = NULL;
return $form;
}