function theme_botcha_forms_form_botcha_forms in BOTCHA Spam Prevention 6.2
Same name and namespace in other branches
- 6.3 botcha.module \theme_botcha_forms_form_botcha_forms()
- 7.2 botcha.admin.inc \theme_botcha_forms_form_botcha_forms()
- 7.3 botcha.module \theme_botcha_forms_form_botcha_forms()
Custom theme function for a table of (form_id -> BOTCHA type) settings
1 theme call to theme_botcha_forms_form_botcha_forms()
- Botcha::getAdminForm in controller/
botcha.controller.inc
File
- ./
botcha.admin.inc, line 400 - Implementation of botcha administration forms.
Code
function theme_botcha_forms_form_botcha_forms($form) {
// @todo Abstract it.
// "Add BOTCHA protection to the form" link.
$output = l(t('Add BOTCHA protection to the form'), Botcha::BOTCHA_ADMIN_PATH . '/form/add');
// Prepare header before pass to theme.
$header = $form['#header'];
$rows = array();
// Existing BOTCHA points.
foreach (element_children($form['botcha_forms']) as $id) {
$row = array();
foreach (element_children($form['botcha_forms'][$id]) as $col) {
$row[$col] = drupal_render($form['botcha_forms'][$id][$col]);
}
$rows[$id] = $row;
}
$output .= theme('table', $header, $rows);
return $output;
}