Merge pull request #15321 from yashodha/dev_1065
[civicrm-core.git] / templates / CRM / Admin / Form / Setting / Mapping.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2019 |
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 *}
26 <div class="help">
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'}
28 </div>
29 <div class="crm-block crm-form-block crm-map-form-block">
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 />
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>
41 </tr>
42 <tr class="crm-map-form-block-geoProvider">
43 <td>{$form.geoProvider.label}</td>
44 <td>{$form.geoProvider.html}<br />
45 <span class="description">{ts}This can be the same or different from the mapping provider selected.{/ts}</span></td>
46 </tr>
47 <tr class="crm-map-form-block-geoAPIKey">
48 <td>{$form.geoAPIKey.label}</td>
49 <td>{$form.geoAPIKey.html|crmAddClass:huge}<br />
50 <span class="description">{ts}Enter the API key or Application ID associated with your geocoding provider.{/ts}</span></td>
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">
57 CRM.$(function($) {
58 var $form = $('form.{/literal}{$form.formClass}{literal}');
59 function showHideMapAPIkey() {
60 var mapProvider = $(this).val();
61 if ( !mapProvider || ( mapProvider === 'OpenStreetMaps' ) ) {
62 $('tr.crm-map-form-block-mapAPIKey', $form).hide( );
63 } else {
64 $('tr.crm-map-form-block-mapAPIKey', $form).show( );
65 }
66 }
67 $('#mapProvider').each(showHideMapAPIkey).change(showHideMapAPIkey);
68 });
69 </script>
70 {/literal}