You are here

function theme_getlocations_search_block_settings_form in Get Locations 7.2

Same name and namespace in other branches
  1. 7 modules/getlocations_search/getlocations_search.module \theme_getlocations_search_block_settings_form()

Themes getlocations_search_block settings form

Parameters

array $variables:

Return value

Returns $output

File

modules/getlocations_search/getlocations_search.module, line 901
getlocations_search.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function theme_getlocations_search_block_settings_form($variables) {
  $form = $variables['form'];
  $output = '';
  $varname = $form['varname']['#value'];
  unset($form['varname']);
  if (isset($form[$varname]['vocab'])) {
    $form[$varname]['vocab']['#prefix'] = '<div id="getlocations_search_defaults_vocab">';
    $form[$varname]['vocab_element']['#suffix'] = '</div>';
  }
  $form[$varname]['useclustermanager']['#prefix'] = '<div id="wrap-getlocations-clusteropts">';
  $form[$varname]['markerclusterer_minsize']['#suffix'] = '</div>';
  $form[$varname]['usemarkermanager']['#prefix'] = '<div id="wrap-getlocations-markeropts">';
  $form[$varname]['maxzoom']['#suffix'] = '</div>';
  $form[$varname]['do_search_marker']['#suffix'] = '<div id="wrap-getlocations-search-marker">';
  $form[$varname]['search_marker_toggle_active']['#suffix'] = '</div>';
  if (module_exists('colorbox')) {
    $getlocations_colorbox = getlocations_colorbox_settings();
    if ($getlocations_colorbox['marker_enable']) {
      $link = getlocations_markerpicker_link($form[$varname]['search_marker']['#id'], 's');
      $form[$varname]['search_marker']['#field_suffix'] = '&nbsp;' . $link;
      if (isset($form[$varname]['gps_marker'])) {
        $link = getlocations_markerpicker_link($form[$varname]['gps_marker']['#id'], 'g');
        $form[$varname]['gps_marker']['#field_suffix'] = '&nbsp;' . $link;
      }
      if (isset($form[$varname]['smartip_marker'])) {
        $link = getlocations_markerpicker_link($form[$varname]['smartip_marker']['#id'], 'm');
        $form[$varname]['smartip_marker']['#field_suffix'] = '&nbsp;' . $link;
      }
    }
  }
  if (module_exists('getlocations_gps')) {
    if (isset($form[$varname]['gps_button']) && $form[$varname]['gps_button']['#type'] !== 'value') {
      $form[$varname]['gps_button']['#prefix'] = '<fieldset class="collapsible getlocations_fieldset form-wrapper"><legend><span class="fieldset-legend">' . t('GPS Button') . '</span></legend><div class="fieldset-wrapper">';
      $tsuf = $form[$varname]['gps_center']['#suffix'];
      $form[$varname]['gps_center']['#suffix'] = $tsuf . '</div></fieldset>';
    }
  }
  if (module_exists('getlocations_smartip')) {
    if (isset($form[$varname]['smartip_button']) && $form[$varname]['smartip_button']['#type'] !== 'value') {
      $form[$varname]['smartip_button']['#prefix'] = '<fieldset class="collapsible getlocations_fieldset form-wrapper"><legend><span class="fieldset-legend">' . t('Smartip Button') . '</span></legend><div class="fieldset-wrapper">';
      $tsuf = $form[$varname]['smartip_center']['#suffix'];
      $form[$varname]['smartip_center']['#suffix'] = $tsuf . '</div></fieldset>';
    }
  }
  $output .= drupal_render_children($form);
  return $output;
}