2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2017 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
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. |
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. |
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 +--------------------------------------------------------------------+
26 {if ! empty( $fields )}
28 <div class="crm-accordion-wrapper crm-group-{$groupId}-accordion {if $rows}collapsed{/if}">
29 <div class="crm-accordion-header crm-master-accordion-header">
30 {ts}Edit Search Criteria{/ts}
32 <div class="crm-accordion-body">
37 <table class="form-layout-compressed" id="profile">
38 {foreach from=$fields item=field key=fieldName}
39 {if $field.skipDisplay}
42 {assign var=n value=$field.name}
43 {assign var="operator_name" value=$n|cat:'_operator'}
44 {if $field.is_search_range}
45 {assign var=from value=$field.name|cat:'_from'}
46 {assign var=to value=$field.name|cat:'_to'}
48 <td class="label">{$form.$from.label}</td>
49 <td class="description">{$form.$from.html} {$form.$to.label} {$form.$to.html}</td>
56 {if $n eq 'addressee' or $n eq 'email_greeting' or $n eq 'postal_greeting'}
57 <td class="description">
58 {include file="CRM/Profile/Form/GreetingType.tpl"}
60 {elseif $n eq 'group'}
62 <table id="selector" class="selector" style="width:auto;">
63 <tr><td>{$form.$n.html}{* quickform add closing </td> </tr>*}
67 <td class="description">
68 {if $n|substr:0:5 eq 'phone'}
69 {assign var="phone_ext_field" value=$n|replace:'phone':'phone_ext'}
71 {if $form.$phone_ext_field.html}
72 {$form.$phone_ext_field.html}
77 {if $field.html_type eq 'Autocomplete-Select' and $field.data_type eq 'ContactReference'}
78 {include file="CRM/Custom/Form/ContactReference.tpl" element_name = $n}
80 {if !empty($form.$operator_name)}
81 <span class="crm-multivalue-search-op" for="{$n}">{$form.$operator_name.html}</span>
82 {assign var="add_multivalue_js" value=true}
90 {if $proximity_search}
91 <tr><td colspan="2">{include file="CRM/Contact/Form/Task/ProximityCommon.tpl"}</td></tr>
94 <tr><td></td><td>{include file="CRM/common/formButtons.tpl"}</td></tr>
98 </div><!-- /.crm-accordion-body -->
99 </div><!-- /.crm-accordion-wrapper -->
102 {elseif $statusMessage}
103 <div class="messages status no-popup">
104 <div class="icon inform-icon"></div>
107 {else} {* empty fields *}
108 <div class="messages status no-popup">
109 <div class="icon inform-icon"></div>
110 {ts}No fields in this Profile have been configured as searchable. Ask the site administrator to check the Profile setup.{/ts}
114 <script type="text/javascript">
116 $('#selector tr:even').addClass('odd-row ');
117 $('#selector tr:odd ').addClass('even-row');
122 {if !empty($add_multivalue_js)}
123 {include file="CRM/Custom/Form/MultiValueSearch.js.tpl"}