function theme_getlocations_fields_field_settings_form in Get Locations 7
Same name and namespace in other branches
- 7.2 modules/getlocations_fields/getlocations_fields.module \theme_getlocations_fields_field_settings_form()
Parameters
array $variables:
Return value
Returns $output
File
- modules/
getlocations_fields/ getlocations_fields.module, line 4440 - getlocations_fields.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function theme_getlocations_fields_field_settings_form($variables) {
$form = $variables['form'];
$output = '';
// try table
$header = array();
$no_striping = TRUE;
$rows = array(
array(
'data' => array(
array(
'data' => $form['input_name_width'],
'class' => array(
'getlocations_fields_input_cell1',
),
),
array(
'data' => $form['input_name_weight'],
'class' => array(
'getlocations_fields_input_cell2',
),
),
array(
'data' => $form['input_name_required'],
'class' => array(
'getlocations_fields_input_cell3',
),
),
),
'no_striping' => $no_striping,
),
array(
'data' => array(
array(
'data' => $form['input_street_width'],
'class' => array(
'getlocations_fields_input_cell1',
),
),
array(
'data' => $form['input_street_weight'],
'class' => array(
'getlocations_fields_input_cell2',
),
),
array(
'data' => $form['input_street_required'],
'class' => array(
'getlocations_fields_input_cell3',
),
),
),
'no_striping' => $no_striping,
),
array(
'data' => array(
array(
'data' => $form['input_additional_width'],
'class' => array(
'getlocations_fields_input_cell1',
),
),
array(
'data' => $form['input_additional_weight'],
'class' => array(
'getlocations_fields_input_cell2',
),
),
array(
'data' => $form['input_additional_required'],
'class' => array(
'getlocations_fields_input_cell3',
),
),
),
'no_striping' => $no_striping,
),
array(
'data' => array(
array(
'data' => $form['input_city_width'],
'class' => array(
'getlocations_fields_input_cell1',
),
),
array(
'data' => $form['input_city_weight'],
'class' => array(
'getlocations_fields_input_cell2',
),
),
array(
'data' => $form['input_city_required'],
'class' => array(
'getlocations_fields_input_cell3',
),
),
),
'no_striping' => $no_striping,
),
array(
'data' => array(
array(
'data' => $form['input_province_width'],
'class' => array(
'getlocations_fields_input_cell1',
),
),
array(
'data' => $form['input_province_weight'],
'class' => array(
'getlocations_fields_input_cell2',
),
),
array(
'data' => $form['input_province_required'],
'class' => array(
'getlocations_fields_input_cell3',
),
),
),
'no_striping' => $no_striping,
),
array(
'data' => array(
array(
'data' => $form['input_postal_code_width'],
'class' => array(
'getlocations_fields_input_cell1',
),
),
array(
'data' => $form['input_postal_code_weight'],
'class' => array(
'getlocations_fields_input_cell2',
),
),
array(
'data' => $form['input_postal_code_required'],
'class' => array(
'getlocations_fields_input_cell3',
),
),
),
'no_striping' => $no_striping,
),
array(
'data' => array(
array(
'data' => $form['input_country_width'],
'class' => array(
'getlocations_fields_input_cell1',
),
),
array(
'data' => $form['input_country_weight'],
'class' => array(
'getlocations_fields_input_cell2',
),
),
array(
'data' => $form['input_country_required'],
'class' => array(
'getlocations_fields_input_cell3',
),
),
),
'no_striping' => $no_striping,
),
array(
'data' => array(
array(
'data' => $form['input_phone_width'],
'class' => array(
'getlocations_fields_input_cell1',
),
),
array(
'data' => $form['input_phone_weight'],
'class' => array(
'getlocations_fields_input_cell2',
),
),
array(
'data' => $form['input_phone_required'],
'class' => array(
'getlocations_fields_input_cell3',
),
),
),
'no_striping' => $no_striping,
),
array(
'data' => array(
array(
'data' => $form['input_mobile_width'],
'class' => array(
'getlocations_fields_input_cell1',
),
),
array(
'data' => $form['input_mobile_weight'],
'class' => array(
'getlocations_fields_input_cell2',
),
),
array(
'data' => $form['input_mobile_required'],
'class' => array(
'getlocations_fields_input_cell3',
),
),
),
'no_striping' => $no_striping,
),
array(
'data' => array(
array(
'data' => $form['input_fax_width'],
'class' => array(
'getlocations_fields_input_cell1',
),
),
array(
'data' => $form['input_fax_weight'],
'class' => array(
'getlocations_fields_input_cell2',
),
),
array(
'data' => $form['input_fax_required'],
'class' => array(
'getlocations_fields_input_cell3',
),
),
),
'no_striping' => $no_striping,
),
array(
'data' => array(
array(
'data' => $form['input_latitude_width'],
'class' => array(
'getlocations_fields_input_cell1',
),
),
array(
'data' => $form['input_latitude_weight'],
'class' => array(
'getlocations_fields_input_cell2',
),
),
array(
'data' => '',
'class' => array(
'getlocations_fields_input_cell3',
),
),
),
'no_striping' => $no_striping,
),
array(
'data' => array(
array(
'data' => $form['input_longitude_width'],
'class' => array(
'getlocations_fields_input_cell1',
),
),
array(
'data' => $form['input_longitude_weight'],
'class' => array(
'getlocations_fields_input_cell2',
),
),
array(
'data' => '',
'class' => array(
'getlocations_fields_input_cell3',
),
),
),
'no_striping' => $no_striping,
),
);
$attributes = array(
'class' => array(
'getlocations_fields_input_table',
),
);
$table = theme('table', array(
'header' => $header,
'rows' => $rows,
'attributes' => $attributes,
));
$form['input_name_width'] = array(
'#markup' => $table,
);
unset($form['input_name_required']);
unset($form['input_name_weight']);
unset($form['input_street_width']);
unset($form['input_street_required']);
unset($form['input_street_weight']);
unset($form['input_additional_width']);
unset($form['input_additional_required']);
unset($form['input_additional_weight']);
unset($form['input_city_width']);
unset($form['input_city_required']);
unset($form['input_city_weight']);
unset($form['input_province_width']);
unset($form['input_province_required']);
unset($form['input_province_weight']);
unset($form['input_postal_code_width']);
unset($form['input_postal_code_required']);
unset($form['input_postal_code_weight']);
unset($form['input_country_width']);
unset($form['input_country_required']);
unset($form['input_country_weight']);
unset($form['input_latitude_width']);
unset($form['input_latitude_weight']);
unset($form['input_longitude_width']);
unset($form['input_longitude_weight']);
unset($form['input_phone_width']);
unset($form['input_phone_required']);
unset($form['input_phone_weight']);
unset($form['input_mobile_width']);
unset($form['input_mobile_required']);
unset($form['input_mobile_weight']);
unset($form['input_fax_width']);
unset($form['input_fax_required']);
unset($form['input_fax_weight']);
$prefix = '<fieldset class="form-wrapper">';
$prefix .= '<legend><span class="fieldset-legend">' . t('Input form settings') . '</span></legend>';
$prefix .= '<div class="fieldset-wrapper">';
$prefix .= '<div class="fieldset-description">' . t('Configure the input form.') . '</div>';
$form['use_address']['#prefix'] = $prefix;
if (module_exists('countries')) {
$form['only_countries']['#suffix'] = '</div></fieldset>';
}
else {
$form['use_country_dropdown']['#suffix'] = '</div></fieldset>';
}
$prefix = '<fieldset class="form-wrapper">';
$prefix .= '<legend><span class="fieldset-legend">' . t('Input map settings') . '</span></legend>';
$prefix .= '<div class="fieldset-wrapper">';
$prefix .= '<div class="fieldset-description">' . t('Configure the input map.') . '</div>';
$form['input_map_show']['#prefix'] = $prefix;
$form['draggable']['#suffix'] = '</div></fieldset>';
if (isset($form['input_map_marker'])) {
$link = getlocations_markerpicker_link($form['input_map_marker']['#id'], 'i');
$form['input_map_marker']['#field_suffix'] = ' ' . $link;
}
$output .= drupal_render_children($form);
return $output;
}