function hierarchical_select_admin_export in Hierarchical Select 6.3
Same name and namespace in other branches
- 5.3 hierarchical_select.admin.inc \hierarchical_select_admin_export()
- 7.3 hierarchical_select.admin.inc \hierarchical_select_admin_export()
Form definition; config export form.
1 string reference to 'hierarchical_select_admin_export'
- hierarchical_select_menu in ./
hierarchical_select.module - Implementation of hook_menu().
File
- ./
hierarchical_select.admin.inc, line 151 - Module settings and configuration administration UI.
Code
function hierarchical_select_admin_export(&$form_state, $config_id) {
require_once drupal_get_path('module', 'hierarchical_select') . '/includes/common.inc';
$config = hierarchical_select_common_config_get($config_id);
$code = _hierarchical_select_create_export_code($config);
drupal_add_css(drupal_get_path('module', 'hierarchical_select') . '/hierarchical_select.css');
drupal_add_js('$(document).ready(function() { $(".hierarchical-select-code").focus(); });', 'inline');
$lines = substr_count($code, "\n") + 1;
$form['config'] = array(
'#type' => 'textarea',
'#title' => t('Hierarchical Select configuration %config_id', array(
'%config_id' => $config_id,
)),
'#default_value' => $code,
'#rows' => $lines,
'#attributes' => array(
'class' => 'hierarchical-select-config-code',
),
);
return $form;
}