function forena_filter_element in Forena Reports 7
Same name and namespace in other branches
- 8 forena_ui/forena.admin.inc \forena_filter_element()
- 7.5 forena.admin.inc \forena_filter_element()
- 7.2 forena.admin.inc \forena_filter_element()
- 7.3 forena.admin.inc \forena_filter_element()
- 7.4 forena.admin.inc \forena_filter_element()
1 call to forena_filter_element()
- forena_settings in ./
forena.admin.inc - Forena admin settings form
File
- ./
forena.admin.inc, line 271
Code
function forena_filter_element($fmt) {
global $user;
$element['format'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#title' => t('Input formats'),
);
// Get a list of formats that the current user has access to.
$formats = filter_formats($user);
foreach ($formats as $format) {
$options[$format->format] = $format->name;
$element['format']['guidelines'][$format->format] = array(
'#theme' => 'filter_guidelines',
'#format' => $format,
);
}
$element['format']['guidelines']['#weight'] = 12;
$element['format']['forena_input_format'] = array(
'#type' => 'select',
'#title' => t('Text format'),
'#options' => $options,
'#default_value' => $fmt,
'#access' => count($formats) > 1,
'#weight' => 10,
'#attributes' => array(
'class' => array(
'filter-list',
),
),
);
$element['format']['help'] = array(
'#type' => 'container',
'#theme' => 'filter_tips_more_info',
'#attributes' => array(
'class' => array(
'filter-help',
),
),
'#weight' => 11,
);
return $element['format'];
}