manually merged work on CRM-10592, #527
[civicrm-core.git] / templates / CRM / Import / Form / Mapper.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.3 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2013 |
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="crm-block crm-form-block">
27
28 <h3>Mapper - 4 Selectors</h3>
29
30 <div class="form-item">
31 <dl>
32 {section name=count start=1 loop=`$maxMapper`}
33 {assign var='i' value=$smarty.section.count.index}
34 <dt>{$form.mapper[$i].label}</dt><dd>{$form.mapper[$i].html}<span class="tundra" id="id_map_mapper[{$i}]_1"><span id="id_mapper[{$i}]_1"></span></span><span class="tundra" id="id_map_mapper[{$i}]_2"><span id="id_mapper[{$i}]_2"></span></span><span class="tundra" id="id_map_mapper[{$i}]_3"><span id="id_mapper[{$i}]_3"></span></span></dd>
35
36 {literal}
37 <script type="text/javascript">
38 var selId = "id_map_" + {/literal}"mapper[{$i}]"{literal} + "_1";
39 document.getElementById(selId).style.display = "none";
40 var selId = "id_map_" + {/literal}"mapper[{$i}]"{literal} + "_2";
41 document.getElementById(selId).style.display = "none";
42 var selId = "id_map_" + {/literal}"mapper[{$i}]"{literal} + "_3";
43 document.getElementById(selId).style.display = "none";
44 </script>
45 {/literal}
46
47 {/section}
48 </dl>
49 </div>
50
51 <div id="crm-submit-buttons" class="form-item">
52 <dl>
53 <dt>&nbsp;</dt><dd>{$form.buttons.html}</dd>
54 </dl>
55 </div>
56
57
58 {literal}
59 <script type="text/javascript">
60 function showHideSelector2( sel1Name, sel1Val ) {
61 if (sel1Val) {
62 document.getElementById("id_map_" + sel1Name + "_1").style.display = "inline";
63 } else {
64 document.getElementById("id_map_" + sel1Name + "_1").style.display = "none";
65 document.getElementById("id_map_" + sel1Name + "_2").style.display = "none";
66 document.getElementById("id_map_" + sel1Name + "_3").style.display = "none";
67 }
68 }
69 function showHideSelector3( sel1Name, sel1Val ) {
70 if (sel1Val) {
71 document.getElementById("id_map_" + sel1Name + "_2").style.display = "inline";
72 } else {
73 document.getElementById("id_map_" + sel1Name + "_2").style.display = "none";
74 document.getElementById("id_map_" + sel1Name + "_3").style.display = "none";
75 }
76 }
77 function showHideSelector4( sel1Name, sel1Val ) {
78 if (sel1Val) {
79 document.getElementById("id_map_" + sel1Name + "_3").style.display = "inline";
80 } else {
81 document.getElementById("id_map_" + sel1Name + "_3").style.display = "none";
82 }
83 }
84 </script>
85 {/literal}
86 </div>