2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
10 {if ! empty( $fields )}
12 <div class="crm-accordion-wrapper crm-group-{$groupId}-accordion {if $rows}collapsed{/if}">
13 <div class="crm-accordion-header crm-master-accordion-header">
14 {ts}Edit Search Criteria{/ts}
16 <div class="crm-accordion-body">
21 <table class="form-layout-compressed" id="profile">
22 {foreach from=$fields item=field key=fieldName}
23 {if $field.skipDisplay}
26 {assign var=n value=$field.name}
27 {assign var="operator_name" value=$n|cat:'_operator'}
28 {if $field.is_search_range}
29 {assign var=from value=$field.name|cat:'_from'}
30 {assign var=to value=$field.name|cat:'_to'}
32 <td class="label">{$form.$from.label}</td>
33 <td class="description">{$form.$from.html} {$form.$to.label} {$form.$to.html}</td>
40 {if $n eq 'addressee' or $n eq 'email_greeting' or $n eq 'postal_greeting'}
41 <td class="description">
42 {include file="CRM/Profile/Form/GreetingType.tpl"}
44 {elseif $n eq 'group'}
46 <table id="selector" class="selector" style="width:auto;">
47 <tr><td>{$form.$n.html}{* quickform add closing </td> </tr>*}
51 <td class="description">
52 {if $n|substr:0:5 eq 'phone'}
53 {assign var="phone_ext_field" value=$n|replace:'phone':'phone_ext'}
55 {if $form.$phone_ext_field.html}
56 {$form.$phone_ext_field.html}
61 {if $field.html_type eq 'Autocomplete-Select' and $field.data_type eq 'ContactReference'}
62 {include file="CRM/Custom/Form/ContactReference.tpl" element_name = $n}
64 {if !empty($form.$operator_name)}
65 <span class="crm-multivalue-search-op" for="{$n}">{$form.$operator_name.html}</span>
66 {assign var="add_multivalue_js" value=true}
74 {if $proximity_search}
75 <tr><td colspan="2">{include file="CRM/Contact/Form/Task/ProximityCommon.tpl"}</td></tr>
78 <tr><td></td><td>{include file="CRM/common/formButtons.tpl"}</td></tr>
82 </div><!-- /.crm-accordion-body -->
83 </div><!-- /.crm-accordion-wrapper -->
86 {elseif $statusMessage}
87 <div class="messages status no-popup">
88 {icon icon="fa-info-circle"}{/icon}
91 {else} {* empty fields *}
92 <div class="messages status no-popup">
93 {icon icon="fa-info-circle"}{/icon}
94 {ts}No fields in this Profile have been configured as searchable. Ask the site administrator to check the Profile setup.{/ts}
98 <script type="text/javascript">
100 $('#selector tr:even').addClass('odd-row ');
101 $('#selector tr:odd ').addClass('even-row');
106 {if !empty($add_multivalue_js)}
107 {include file="CRM/Custom/Form/MultiValueSearch.js.tpl"}