function theme_system_date_time_settings

theme_system_date_time_settings($variables)

Returns HTML for the date settings form.

Parameters

$variables: An associative array containing:

  • form: A render element representing the form.

Related topics

File

modules/system/system.admin.inc, line 2086
Admin page callbacks for the system module.

Code

function theme_system_date_time_settings($variables) {
  $form = $variables['form'];
  $header = array(
    t('Date type'),
    t('Format'),
    t('Operations'),
  );

  foreach (element_children($form['format']) as $key) {
    $delete_key = $key . '_delete';
    $row = array();
    $row[] = $form['format'][$key]['#title'];
    $form['format'][$key]['#title_display'] = 'invisible';
    $row[] = array('data' => drupal_render($form['format'][$key]));
    $row[] = array('data' => drupal_render($form['delete'][$delete_key]));
    $rows[] = $row;
  }

  $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'system-date-types')));
  $output .= drupal_render_children($form);

  return $output;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!system!system.admin.inc/function/theme_system_date_time_settings/7.x