function colorized_gmap_block_configure in Colorized google maps block 7
Implements hook_block_configure().
File
- ./
colorized_gmap.module, line 150 - Colorized gmap module.
Code
function colorized_gmap_block_configure($delta = '') {
$api_key = variable_get('colorized_gmap_api_key', '');
if (empty($api_key)) {
$missing_api_key_message = t('Google maps are no longer working without !info. Please visit !get-key page to get API key and follow further instructions. After that, please enter your api key on !settings-page.', array(
'!info' => l("api key", "http://googlegeodevelopers.blogspot.ru/2016/06/building-for-scale-updates-to-google.html", array(
'external' => TRUE,
'attributes' => array(
'target' => '_blank',
),
)),
'!get-key' => l('this', 'https://developers.google.com/maps/documentation/javascript/get-api-key', array(
'external' => TRUE,
'attributes' => array(
'target' => '_blank',
),
)),
'!settings-page' => l('module settings page', '/admin/config/content/colorized_gmap'),
));
drupal_set_message($missing_api_key_message, 'warning');
}
$form = array();
$form['#attached']['libraries_load'][] = array(
'colorpicker',
);
$form['#attached']['css'] = array(
drupal_get_path('module', 'colorized_gmap') . '/css/colorized_gmap.css',
);
$api_url = colorized_gmap_build_api_url();
$form['#attached']['js'] = array(
drupal_get_path('module', 'colorized_gmap') . '/js/colorized_gmap_admin.js',
"{$api_url}" => array(
'type' => 'external',
'scope' => 'footer',
),
);
return $form;
}