2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
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 {if $field.is_search_range}
44 {assign var=from value=$field.name|cat:'_from'}
45 {assign var=to value=$field.name|cat:'_to'}
46 {if $field.data_type neq 'Date'}
48 <td class="label">{$form.$from.label}</td>
49 <td class="description">{$form.$from.html} {$form.$to.label} {$form.$to.html}</td>
53 <td class="label">{$form.$from.label}</td>
54 <td class="description">{include file="CRM/common/jcalendar.tpl" elementName=$from}
55 {$form.$to.label} {include file="CRM/common/jcalendar.tpl" elementName=$to}</td>
58 {elseif $field.options_per_line}
60 <td class="option-label">{$form.$n.label}</td>
62 {assign var="count" value="1"}
64 <table class="form-layout-compressed">
66 {* sort by fails for option per line. Added a variable to iterate through the element array*}
67 {assign var="index" value="1"}
68 {foreach name=outer key=key item=item from=$form.$n}
69 {if $index < 10} {* Hack to skip QF field properties that are not checkbox elements. *}
70 {assign var="index" value=`$index+1`}
72 {if $field.html_type EQ 'CheckBox' AND $smarty.foreach.outer.last EQ 1} {* Put 'match ANY / match ALL' checkbox in separate row. *}
75 <td class="op-checkbox" colspan="{$field.options_per_line}" style="padding-top: 0px;">{$form.$n.$key.html}</td>
77 <td class="labels font-light">{$form.$n.$key.html}</td>
78 {if $count EQ $field.options_per_line}
81 {assign var="count" value="1"}
83 {assign var="count" value=`$count+1`}
98 {if $n eq 'addressee' or $n eq 'email_greeting' or $n eq 'postal_greeting'}
99 <td class="description">
100 {include file="CRM/Profile/Form/GreetingType.tpl"}
102 {elseif $n eq 'group'}
104 <table id="selector" class="selector" style="width:auto;">
105 <tr><td>{$form.$n.html}{* quickform add closing </td> </tr>*}
109 <td class="description">
110 {if ( $field.data_type eq 'Date' or
111 ( ( ( $n eq 'birth_date' ) or ( $n eq 'deceased_date' ) ) ) ) }
112 {include file="CRM/common/jcalendar.tpl" elementName=$n}
113 {elseif $n|substr:0:5 eq 'phone'}
114 {assign var="phone_ext_field" value=$n|replace:'phone':'phone_ext'}
116 {if $form.$phone_ext_field.html}
117 {$form.$phone_ext_field.html}
122 {if $field.html_type eq 'Autocomplete-Select'}
123 {if $field.data_type eq 'ContactReference'}
124 {include file="CRM/Custom/Form/ContactReference.tpl" element_name = $n}
133 {if $proximity_search}
134 <tr><td colspan="2">{include file="CRM/Contact/Form/Task/ProximityCommon.tpl"}</td></tr>
137 <tr><td></td><td>{include file="CRM/common/formButtons.tpl"}</td></tr>
141 </div><!-- /.crm-accordion-body -->
142 </div><!-- /.crm-accordion-wrapper -->
145 <script type="text/javascript">
147 cj().crmAccordions();
154 {elseif $statusMessage}
155 <div class="messages status no-popup">
156 <div class="icon inform-icon"></div>
159 {else} {* empty fields *}
160 <div class="messages status no-popup">
161 <div class="icon inform-icon"></div>
162 {ts}No fields in this Profile have been configured as searchable. Ask the site administrator to check the Profile setup.{/ts}
166 <script type="text/javascript">
168 cj('#selector tr:even').addClass('odd-row ');
169 cj('#selector tr:odd ').addClass('even-row');