function theme_system_date_format_localize_form

Returns HTML for a locale date format form.

Parameters

$variables: An associative array containing:

  • form: A render element representing the form.

Related topics

File

drupal/core/modules/system/system.admin.inc, line 2864
Admin page callbacks for the system module.

Code

function theme_system_date_format_localize_form($variables) {
  $form = $variables['form'];
  $header = array(
    'machine_name' => t('Machine Name'),
    'pattern' => t('Format'),
  );
  foreach (element_children($form['date_formats']) as $key) {
    $row = array();
    $row[] = $form['date_formats'][$key]['#title'];
    unset($form['date_formats'][$key]['#title']);
    $row[] = array(
      'data' => drupal_render($form['date_formats'][$key]),
    );
    $rows[] = $row;
  }
  $output = drupal_render($form['language']);
  $output .= theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
  $output .= drupal_render_children($form);
  return $output;
}