You are here

function theme_sms_admin_default_form in SMS Framework 6.2

Same name and namespace in other branches
  1. 5 sms.module \theme_sms_admin_default_form()
  2. 6 sms.admin.inc \theme_sms_admin_default_form()
  3. 7 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 56
The admin sms functions.

Code

function theme_sms_admin_default_form($form) {
  $rows = array();
  foreach ($form as $name => $element) {
    if (isset($element['id']) && is_array($element['id'])) {
      $rows[] = array(
        drupal_render($form['default'][$element['id']['#value']]),
        check_plain($name),
        drupal_render($element['configure']),
      );
      unset($form[$name]);
    }
  }
  $header = array(
    t('Default'),
    t('Name'),
    array(
      'data' => t('Operations'),
      'colspan' => 1,
    ),
  );
  $output .= theme('table', $header, $rows);
  $output .= drupal_render($form);
  return $output;
}