function insight_admin_alerts_settings in Insight 7
File
- ./
insight.admin.inc, line 103 - Admin page callback for the insight module.
Code
function insight_admin_alerts_settings() {
$report_defs = insight_report_info();
$settings = variable_get('insight_alerts_settings', array());
$form['#tree'] = TRUE;
foreach ($report_defs as $name => $def) {
$form[$name] = array(
'#type' => 'fieldset',
'#title' => $def['title'] . ' ' . t('report'),
//'#description' => t('Check the below boxes to display widgets in node links by content types.'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$settings = isset($settings[$name]) ? $settings[$name] : NULL;
if (isset($def['alerts settings callback'])) {
$form[$name] = array_merge($form[$name], call_user_func($def['settings form elements callback'], $settings, $report_defs[$name]));
}
}
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
);
return $form;
}