Skip to content
Snippets Groups Projects
Commit 56fc2a21 authored by ndobromirov's avatar ndobromirov Committed by podarok
Browse files

Issue #2605496 by ndobromirov: Location field widget missing JavaScript file...

Issue #2605496 by ndobromirov: Location field widget missing JavaScript file on failed form validation
parent 86b2adee
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,8 @@
function location_gmap_find_address_field_widget_form_alter(&$element, &$form_state, $context) {
if ($context['field']['type'] == 'location' && variable_get('location_usegmap', 0)) {
if (isset($element['#location_settings']['form']['fields']['locpick'])) {
drupal_add_js(drupal_get_path("module", "location_gmap_find_address") . "/location_gmap_find_address.js");
$js_path = drupal_get_path('module', 'location_gmap_find_address') . '/location_gmap_find_address.js';
$element['#attached']['js'][$js_path] = array('scope' => 'footer');
$element["#pre_render"] = array('location_gmap_find_address_location_pre_render');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment