function theme_crm_hat_data_set_rules_form in Party 8.2
Same name and namespace in other branches
- 7 modules/party_hat/party_hat.admin.inc \theme_crm_hat_data_set_rules_form()
Theme function for the data set rules form fieldset.
1 theme call to theme_crm_hat_data_set_rules_form()
- party_hat_form in modules/
party_hat/ party_hat.admin.inc - Entity form for party hats.
File
- modules/
party_hat/ party_hat.admin.inc, line 136 - Contains admin page callbacks for the party hats module.
Code
function theme_crm_hat_data_set_rules_form($variables) {
$form = $variables['form'];
$output = '';
$rows = array();
foreach (element_children($form) as $data_set) {
$row = array();
$row[] = $form[$data_set]['#title'];
foreach (array_keys($form[$data_set]['#options']) as $radio_key) {
// Remove the checkbox label; it's shown in the table header.
unset($form[$data_set][$radio_key]['#title']);
$row[] = drupal_render($form[$data_set][$radio_key]);
}
$rows[] = $row;
}
$header = array_merge(array(
t('Data set'),
), $form[$data_set]['#options']);
$output .= theme('table', array(
'rows' => $rows,
'header' => $header,
));
return $output;
}