Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
fee14197 | 3 | | CiviCRM version 5 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
6b83d5bd | 5 | | Copyright CiviCRM LLC (c) 2004-2019 | |
6a488035 TO |
6 | +--------------------------------------------------------------------+ |
7 | | This file is a part of CiviCRM. | | |
8 | | | | |
9 | | CiviCRM is free software; you can copy, modify, and distribute it | | |
10 | | under the terms of the GNU Affero General Public License | | |
11 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | |
12 | | | | |
13 | | CiviCRM is distributed in the hope that it will be useful, but | | |
14 | | WITHOUT ANY WARRANTY; without even the implied warranty of | | |
15 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | |
16 | | See the GNU Affero General Public License for more details. | | |
17 | | | | |
18 | | You should have received a copy of the GNU Affero General Public | | |
19 | | License and the CiviCRM Licensing Exception along | | |
20 | | with this program; if not, contact CiviCRM LLC | | |
21 | | at info[AT]civicrm[DOT]org. If you have questions about the | | |
22 | | GNU Affero General Public License or the licensing of CiviCRM, | | |
23 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | | |
24 | +--------------------------------------------------------------------+ | |
25 | *} | |
f6eedce7 | 26 | <div class="help"> |
423641a4 | 27 | {ts}CiviCRM includes plugins for several mapping and geocoding web services. When your users save a contact or event location address, a geocoding service will convert the address into geographical coordinates, which are required for mapping. Mapping services allow your users to display addresses on a map.{/ts} {help id='map-intro-id'} |
6a488035 | 28 | </div> |
2c3c9a71 | 29 | <div class="crm-block crm-form-block crm-map-form-block"> |
6a488035 TO |
30 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div> |
31 | <table class="form-layout-compressed"> | |
32 | <tr class="crm-map-form-block-mapProvider"> | |
33 | <td>{$form.mapProvider.label}</td> | |
34 | <td>{$form.mapProvider.html}<br /> | |
35 | <span class="description">{ts}Choose the mapping provider that has the best coverage for the majority of your contact addresses.{/ts}</span></td> | |
36 | </tr> | |
37 | <tr class="crm-map-form-block-mapAPIKey"> | |
38 | <td>{$form.mapAPIKey.label}</td> | |
39 | <td>{$form.mapAPIKey.html|crmAddClass:huge}<br /> | |
7811b816 | 40 | <span class="description">{ts}Enter your API Key or Application ID. An API Key is required for the Google Maps API. Refer to developers.google.com for the latest information.{/ts}</span></td> |
6a488035 TO |
41 | </tr> |
42 | <tr class="crm-map-form-block-geoProvider"> | |
43 | <td>{$form.geoProvider.label}</td> | |
44 | <td>{$form.geoProvider.html}<br /> | |
89155632 | 45 | <span class="description">{ts}This can be the same or different from the mapping provider selected.{/ts}</span></td> |
6a488035 TO |
46 | </tr> |
47 | <tr class="crm-map-form-block-geoAPIKey"> | |
48 | <td>{$form.geoAPIKey.label}</td> | |
49 | <td>{$form.geoAPIKey.html|crmAddClass:huge}<br /> | |
423641a4 | 50 | <span class="description">{ts}Enter the API key or Application ID associated with your geocoding provider.{/ts}</span></td> |
6a488035 TO |
51 | </tr> |
52 | </table> | |
53 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div> | |
54 | </div> | |
55 | {literal} | |
56 | <script type="text/javascript"> | |
3cc60a06 | 57 | CRM.$(function($) { |
b50fdacc | 58 | var $form = $('form.{/literal}{$form.formClass}{literal}'); |
ae8f569f CW |
59 | function showHideMapAPIkey() { |
60 | var mapProvider = $(this).val(); | |
61 | if ( !mapProvider || ( mapProvider === 'OpenStreetMaps' ) ) { | |
b50fdacc | 62 | $('tr.crm-map-form-block-mapAPIKey', $form).hide( ); |
ae8f569f | 63 | } else { |
b50fdacc | 64 | $('tr.crm-map-form-block-mapAPIKey', $form).show( ); |
ae8f569f | 65 | } |
6a488035 | 66 | } |
ae8f569f CW |
67 | $('#mapProvider').each(showHideMapAPIkey).change(showHideMapAPIkey); |
68 | }); | |
6a488035 TO |
69 | </script> |
70 | {/literal} |