function theme_botcha_admin_settings_botcha_points in BOTCHA Spam Prevention 7
Same name and namespace in other branches
- 6 botcha.pages.inc \theme_botcha_admin_settings_botcha_points()
Custom theme function for a table of (form_id -> BOTCHA type) settings
1 theme call to theme_botcha_admin_settings_botcha_points()
- _botcha_admin_settings in ./
botcha.pages.inc - Module settings form.
File
- ./
botcha.pages.inc, line 196 - Implementation of botcha administration forms.
Code
function theme_botcha_admin_settings_botcha_points($variables) {
$form = $variables['form'];
$header = array(
'form_id',
t('Protection type'),
t('Operations'),
);
$rows = array();
// Existing BOTCHA points.
foreach (element_children($form['botcha_botcha_points']) as $key) {
$row = array();
$row[] = drupal_render($form['botcha_botcha_points'][$key]['form_id']);
$row[] = drupal_render($form['botcha_botcha_points'][$key]['botcha_type']);
$row[] = drupal_render($form['botcha_botcha_points'][$key]['operations']);
$rows[] = $row;
}
// For new BOTCHA point.
$row = array();
$row[] = drupal_render($form['botcha_new_botcha_point']['form_id']);
$row[] = drupal_render($form['botcha_new_botcha_point']['botcha_type']);
$row[] = '';
$rows[] = $row;
$output = theme('table', array(
'header' => $header,
'rows' => $rows,
));
return $output;
}