You are here

function theme_sms_carriers_admin_form in SMS Framework 6.2

Same name and namespace in other branches
  1. 7 sms.admin.inc \theme_sms_carriers_admin_form()

Returns HTML for the sms carriers admin form.

Parameters

$form: A form array.

File

./sms.admin.inc, line 304
The admin sms functions.

Code

function theme_sms_carriers_admin_form($form) {
  $output = '';
  $header = array(
    '',
    t('Carrier'),
    t('Domain'),
    t('Actions'),
  );
  $rows = array();
  foreach (element_children($form['status']) as $element) {
    $name = "<div class='carrier'>";
    $name .= "<strong>{$form['status'][$element]['#title']}</strong>";
    $name .= "<div class='description'>{$form['status'][$element]['#description']}</div>";
    $name .= "</div>";
    unset($form['status'][$element]['#title']);
    unset($form['status'][$element]['#description']);
    $row = array(
      'status' => drupal_render($form['status'][$element]),
      'name' => $name,
      'domain' => drupal_render($form['domain'][$element]),
      'actions' => drupal_render($form['actions'][$element]),
    );
    $rows[] = $row;
  }
  $output .= theme('table', $header, $rows, array(
    'id' => 'sms-form-table',
    'class' => 'sms',
  ));
  $output .= drupal_render($form['submit']);
  $output .= drupal_render($form);
  return $output;
}