Always show parent/child nesting in group selectors
[civicrm-core.git] / templates / CRM / Contact / Form / Search / Criteria / Basic.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
819d0d41 3 | CiviCRM version 4.5 |
6a488035 4 +--------------------------------------------------------------------+
819d0d41 5 | Copyright CiviCRM LLC (c) 2004-2014 |
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*}
26<table class="form-layout">
27 <tr>
28 <td><label>{ts}Complete OR Partial Name{/ts}</label><br />
29 {$form.sort_name.html}
30 </td>
31 <td>
32 <label>{ts}Complete OR Partial Email{/ts}</label><br />
33 {$form.email.html}
34 </td>
35 <td>
36 {$form.uf_group_id.label} {help id="id-search-views"}<br />{$form.uf_group_id.html}
37 </td>
38 <td>
39 {if $form.component_mode}
40 {$form.component_mode.label} {help id="id-display-results"}
41 <br />
42 {$form.component_mode.html}
43 {if $form.display_relationship_type}
44 <span id="crm-display_relationship_type">{$form.display_relationship_type.html}</span>
45 {/if}
46 {else}
47 &nbsp;
48 {/if}
49 </td>
50 <td class="labels" rowspan="2">
51 <div class="crm-submit-buttons">
52 {include file="CRM/common/formButtons.tpl" location="top" buttonStyle="width:80px; text-align:center;"}
53 </div>
54 <div class="crm-submit-buttons reset-advanced-search">
55 <a href="{crmURL p='civicrm/contact/search/advanced' q='reset=1'}" id="resetAdvancedSearch" class="button" style="width:70px; text-align:center;"><span>{ts}Reset Form{/ts}</span></a>
56 </div>
57 </td>
58 </tr>
59 <tr>
60 {if $form.contact_type}
61 <td><label>{ts}Contact Type(s){/ts}</label><br />
62 {$form.contact_type.html}
6a488035
TO
63 </td>
64 {else}
65 <td>&nbsp;</td>
66 {/if}
67 {if $form.group}
68 <td>
4a143c04 69 <div id='groupselect'><label>{ts}Group(s){/ts} <span class="description">(<a id='searchbygrouptype'>{ts}search by group type{/ts}</a>)</span></label>
6a488035 70 {$form.group.html}
6a488035
TO
71 </div>
72 <div id='grouptypeselect'>
4a143c04 73 <label>{ts}Group Type(s){/ts} <span class="description"> (<a id='searchbygroup'>{ts}search by group{/ts}</a>)</span></label>
6a488035
TO
74 {$form.group_type.html}
75 {literal}
76 <script type="text/javascript">
3cc60a06 77 CRM.$(function($) {
02ddf039 78 function showGroupSearch(){
6a488035
TO
79 cj('#grouptypeselect').hide();
80 cj('#groupselect').show();
02ddf039
CW
81 cj('#group_type').select2('val', '');
82 }
83 function showGroupTypeSearch(){
6a488035
TO
84 cj('#groupselect').hide();
85 cj('#grouptypeselect').show();
02ddf039
CW
86 cj('#group').select2('val', '');
87 }
6a488035
TO
88 cj('#searchbygrouptype').click(function() {
89 showGroupTypeSearch();
90 });
91 cj('#searchbygroup').click(function() {
92 showGroupSearch();
93 });
94
95 if (cj('#group_type').val() ) {
96 showGroupTypeSearch();
97 }
98 else {
99 showGroupSearch();
100 }
101
102 });
103 </script>
104 {/literal}
105 </div>
106 </td>
107 {else}
108 <td>&nbsp;</td>
109 {/if}
110 <td>{$form.operator.label} {help id="id-search-operator"}<br />{$form.operator.html}</td>
111 <td>
112 {if $form.deleted_contacts}{$form.deleted_contacts.html} {$form.deleted_contacts.label}{else}&nbsp;{/if}
113 </td>
114 </tr>
115 <tr>
116 {if $form.contact_tags}
117 <td><label>{ts}Select Tag(s){/ts}</label>
118 {$form.contact_tags.html}
6a488035
TO
119 </td>
120 {else}
121 <td>&nbsp;</td>
122 {/if}
123 {if $isTagset}
6d538af3 124 <td colspan="2">{include file="CRM/common/Tagset.tpl"}</td>
6a488035 125 {/if}
8a4f27dc 126 <td>{$form.tag_search.label} {help id="id-all-tags"}<br />{$form.tag_search.html}</td>
6a488035
TO
127 {if ! $isTagset}
128 <td colspan="2">&nbsp;</td>
129 {/if}
130 <td>&nbsp;</td>
131 </tr>
132 {if $form.all_tag_types}
133 <tr>
134 <td colspan="5">
135 {$form.all_tag_types.html} {$form.all_tag_types.label} {help id="id-all-tag-types"}
136 </td>
137 </tr>
138 {/if}
139 <tr>
140 <td>
141 <div>
142 {$form.phone_numeric.label}<br />{$form.phone_numeric.html}
143 </div>
144 <div class="description font-italic">
145 {ts}Punctuation and spaces are ignored.{/ts}
146 </div>
147 </td>
148 <td>{$form.phone_location_type_id.label}<br />{$form.phone_location_type_id.html}</td>
149 <td>{$form.phone_phone_type_id.label}<br />{$form.phone_phone_type_id.html}</td>
150 </tr>
151 <tr>
152 <td colspan="2">
153 <table class="form-layout-compressed">
154 <tr>
155 <td colspan="2">
156 {$form.privacy_toggle.html} {help id="id-privacy"}
157 </td>
158 </tr>
159 <tr>
160 <td>
161 {$form.privacy_options.html}
162 </td>
163 <td style="vertical-align:middle">
164 <div id="privacy-operator-wrapper">{$form.privacy_operator.html} {help id="privacy-operator"}</div>
165 </td>
166 </tr>
167 </table>
168 {literal}
169 <script type="text/javascript">
6a488035 170 cj("select#privacy_options").change(function() {
02ddf039 171 if (cj(this).val() && cj(this).val().length > 1) {
6a488035
TO
172 cj('#privacy-operator-wrapper').show();
173 } else {
174 cj('#privacy-operator-wrapper').hide();
175 }
176 }).change();
177 </script>
178 {/literal}
179 </td>
180 <td colspan="3">
181 {$form.preferred_communication_method.label}<br />
182 {$form.preferred_communication_method.html}<br />
183 <div class="spacer"></div>
184 {$form.email_on_hold.html} {$form.email_on_hold.label}
185 </td>
186 </tr>
187 <tr>
188 <td>
189 {$form.contact_source.label} {help id="id-source" file="CRM/Contact/Form/Contact"}<br />
190 {$form.contact_source.html}
191 </td>
192 <td>
193 {if $form.uf_user}
4a143c04 194 {$form.uf_user.label} {$form.uf_user.html}
6a488035
TO
195 <div class="description font-italic">
196 {ts 1=$config->userFramework}Does the contact have a %1 Account?{/ts}
197 </div>
198 {else}
199 &nbsp;
200 {/if}
201 </td>
202 <td>
203 {$form.job_title.label}<br />
204 {$form.job_title.html}
205 </td>
206 </tr>
207 <tr>
208 <td>
c8ef633b
DL
209 {$form.contact_id.label} {help id="id-internal-id" file="CRM/Contact/Form/Contact"}<br />
210 {$form.contact_id.html}
6a488035
TO
211 </td>
212 <td>
213 {$form.external_identifier.label} {help id="id-external-id" file="CRM/Contact/Form/Contact"}<br />
214 {$form.external_identifier.html}
215 </td>
216 <td colspan="3">
217 {$form.preferred_language.label}<br />
218 {$form.preferred_language.html}
219 </td>
220 </tr>
221</table>