You are here

function theme_location_proximity_form in Location 5

File

./location.theme, line 206

Code

function theme_location_proximity_form(&$form) {

  //drupal_set_message("called theme_location_proximity_form()");
  $row = array();
  $row[] = array(
    'data' => t('Search within '),
  );
  $row[] = array(
    'data' => drupal_render($form['distance']),
    'cellspacing' => 0,
    'cellpadding' => 0,
  );
  if ($form['unit']['#type'] == 'select') {
    $row[] = array(
      'data' => drupal_render($form['unit']),
      'cellspacing' => 0,
      'cellpadding' => 0,
    );
    $row[] = array(
      'data' => t(' of:'),
      'cellspacing' => 0,
      'cellpadding' => 0,
    );
  }
  else {
    $row[] = array(
      'data' => ($form['unit']['#value'] == 'km' ? t('km') : t('miles')) . ' ' . t('of:') . drupal_render($form['unit']),
      'cellspacing' => 0,
      'cellpadding' => 0,
    );
  }
  $output = theme('table', NULL, array(
    $row,
  ));
  $output .= drupal_render($form);
  return $output;
}