1 locale.theme.inc theme_locale_date_format_form($variables)

Returns themed HTML for the locale_date_format_form() form.

Parameters

$variables: An associative array containing:

  • form: A render element representing the form.

Related topics

File

core/modules/locale/locale.theme.inc, line 82
Theme functions for the Locale module.

Code

function theme_locale_date_format_form($variables) {
  $form = $variables['form'];
  $header = array(
    'machine_name' => t('Language'),
    'pattern' => t('Format'),
  );

  foreach (element_children($form['locales']) as $key) {
    $row = array();
    $row[] = $form['locales'][$key]['#title'];
    unset($form['locales'][$key]['#title']);
    $row[] = array('data' => backdrop_render($form['locales'][$key]));
    $rows[] = $row;
  }

  $output = backdrop_render($form['help']);
  $output .= theme('table', array('header' => $header, 'rows' => $rows));
  $output .= backdrop_render_children($form);

  return $output;
}