Merge pull request #4004 from civicrm/4.4
[civicrm-core.git] / templates / CRM / Contact / Form / Search / Criteria / Basic.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
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="crm-hover-button" title="{ts}Clear all search criteria{/ts}">
56 <span class="icon ui-icon-circle-close"></span>
57 {ts}Reset Form{/ts}
58 </a>
59 </div>
60 </td>
61 </tr>
62 <tr>
63 {if $form.contact_type}
64 <td><label>{ts}Contact Type(s){/ts}</label><br />
65 {$form.contact_type.html}
66 </td>
67 {else}
68 <td>&nbsp;</td>
69 {/if}
70 {if $form.group}
71 <td>
72 <div id='groupselect'><label>{ts}Group(s){/ts} <span class="description">(<a href="#" id='searchbygrouptype'>{ts}search by group type{/ts}</a>)</span></label>
73 {$form.group.html}
74 </div>
75 <div id='grouptypeselect'>
76 <label>{ts}Group Type(s){/ts} <span class="description"> (<a href="#" id='searchbygroup'>{ts}search by group{/ts}</a>)</span></label>
77 {$form.group_type.html}
78 {literal}
79 <script type="text/javascript">
80 CRM.$(function($) {
81 function showGroupSearch() {
82 $('#grouptypeselect').hide();
83 $('#groupselect').show();
84 $('#group_type').select2('val', '');
85 return false;
86 }
87 function showGroupTypeSearch() {
88 $('#groupselect').hide();
89 $('#grouptypeselect').show();
90 $('#group').select2('val', '');
91 return false;
92 }
93 $('#searchbygrouptype').click(showGroupTypeSearch);
94 $('#searchbygroup').click(showGroupSearch);
95
96 if ($('#group_type').val() ) {
97 showGroupTypeSearch();
98 }
99 else {
100 showGroupSearch();
101 }
102
103 });
104 </script>
105 {/literal}
106 </div>
107 </td>
108 {else}
109 <td>&nbsp;</td>
110 {/if}
111 <td>{$form.operator.label} {help id="id-search-operator"}<br />{$form.operator.html}</td>
112 <td>
113 {if $form.deleted_contacts}{$form.deleted_contacts.html} {$form.deleted_contacts.label}{else}&nbsp;{/if}
114 </td>
115 </tr>
116 <tr>
117 {if $form.contact_tags}
118 <td><label>{ts}Select Tag(s){/ts}</label>
119 {$form.contact_tags.html}
120 </td>
121 {else}
122 <td>&nbsp;</td>
123 {/if}
124 {if $isTagset}
125 <td colspan="2">{include file="CRM/common/Tagset.tpl"}</td>
126 {/if}
127 <td>{$form.tag_search.label} {help id="id-all-tags"}<br />{$form.tag_search.html}</td>
128 {if ! $isTagset}
129 <td colspan="2">&nbsp;</td>
130 {/if}
131 <td>&nbsp;</td>
132 </tr>
133 {if $form.all_tag_types}
134 <tr>
135 <td colspan="5">
136 {$form.all_tag_types.html} {$form.all_tag_types.label} {help id="id-all-tag-types"}
137 </td>
138 </tr>
139 {/if}
140 <tr>
141 <td>
142 <div>
143 {$form.phone_numeric.label}<br />{$form.phone_numeric.html}
144 </div>
145 <div class="description font-italic">
146 {ts}Punctuation and spaces are ignored.{/ts}
147 </div>
148 </td>
149 <td>{$form.phone_location_type_id.label}<br />{$form.phone_location_type_id.html}</td>
150 <td>{$form.phone_phone_type_id.label}<br />{$form.phone_phone_type_id.html}</td>
151 </tr>
152 <tr>
153 <td colspan="2">
154 <table class="form-layout-compressed">
155 <tr>
156 <td colspan="2">
157 {$form.privacy_toggle.html} {help id="id-privacy"}
158 </td>
159 </tr>
160 <tr>
161 <td>
162 {$form.privacy_options.html}
163 </td>
164 <td style="vertical-align:middle">
165 <div id="privacy-operator-wrapper">{$form.privacy_operator.html} {help id="privacy-operator"}</div>
166 </td>
167 </tr>
168 </table>
169 {literal}
170 <script type="text/javascript">
171 cj("select#privacy_options").change(function() {
172 if (cj(this).val() && cj(this).val().length > 1) {
173 cj('#privacy-operator-wrapper').show();
174 } else {
175 cj('#privacy-operator-wrapper').hide();
176 }
177 }).change();
178 </script>
179 {/literal}
180 </td>
181 <td colspan="3">
182 {$form.preferred_communication_method.label}<br />
183 {$form.preferred_communication_method.html}<br />
184 <div class="spacer"></div>
185 {$form.email_on_hold.html} {$form.email_on_hold.label}
186 </td>
187 </tr>
188 <tr>
189 <td>
190 {$form.contact_source.label} {help id="id-source" file="CRM/Contact/Form/Contact"}<br />
191 {$form.contact_source.html}
192 </td>
193 <td>
194 {if $form.uf_user}
195 {$form.uf_user.label} {$form.uf_user.html}
196 <div class="description font-italic">
197 {ts 1=$config->userFramework}Does the contact have a %1 Account?{/ts}
198 </div>
199 {else}
200 &nbsp;
201 {/if}
202 </td>
203 <td>
204 {$form.job_title.label}<br />
205 {$form.job_title.html}
206 </td>
207 </tr>
208 <tr>
209 <td>
210 {$form.contact_id.label} {help id="id-internal-id" file="CRM/Contact/Form/Contact"}<br />
211 {$form.contact_id.html}
212 </td>
213 <td>
214 {$form.external_identifier.label} {help id="id-external-id" file="CRM/Contact/Form/Contact"}<br />
215 {$form.external_identifier.html}
216 </td>
217 <td colspan="3">
218 {$form.preferred_language.label}<br />
219 {$form.preferred_language.html}
220 </td>
221 </tr>
222 </table>