You are here

function theme_geofield_proximity in Geofield 7.2

Theme wrapper for form item

File

./geofield.elements.inc, line 344
Provides FormAPI element callbacks for geofield_latlon and geofield_proximity.

Code

function theme_geofield_proximity($vars) {
  $element = $vars['element'];
  $attributes = !empty($element['#wrapper_attributes']) ? $element['#wrapper_attributes'] : array(
    'class' => array(),
  );
  $attributes['class'][] = 'geofield-proximity-field-wrapper';
  $attributes['class'][] = 'clearfix';
  $wrapper_attributes = array();
  $wrapper_attributes['class'][] = 'clearfix';
  if (isset($element['#children'])) {
    $element['#children'] = '<div id="' . $element['#id'] . '" ' . drupal_attributes($wrapper_attributes) . '>' . $element['#children'] . '</div>';
  }
  $output = '<div ' . drupal_attributes($attributes) . '>' . theme('form_element', $element) . '</div>';
  return $output;
}