function theme_sms_admin_default_form in SMS Framework 7
Same name and namespace in other branches
- 5 sms.module \theme_sms_admin_default_form()
- 6.2 sms.admin.inc \theme_sms_admin_default_form()
- 6 sms.admin.inc \theme_sms_admin_default_form()
Returns HTML for the admin default gateway form.
Parameters
$form: An form array.
File
- ./
sms.admin.inc, line 61 - The admin sms functions.
Code
function theme_sms_admin_default_form($variables) {
$form = $variables['form'];
$rows = array();
foreach ($form as $name => $element) {
if (is_array($element) and isset($element['id']) and is_array($element['id'])) {
$rows[] = array(
drupal_render($form['default'][$element['id']['#markup']]),
check_plain($name),
$element['configure']['#markup'],
);
unset($form[$name]);
}
}
$header = array(
t('Default'),
t('Name'),
array(
'data' => t('Operations'),
'colspan' => 1,
),
);
$output = '';
$output .= theme('table', array(
'header' => $header,
'rows' => $rows,
));
$output .= drupal_render_children($form);
return $output;
}