Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
fee14197 | 3 | | CiviCRM version 5 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
6b83d5bd | 5 | | Copyright CiviCRM LLC (c) 2004-2019 | |
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 | {if $groupTree} | |
27 | {foreach from=$groupTree item=cd_edit key=group_id} | |
28 | ||
29 | <div class="crm-accordion-wrapper crm-contactDetails-accordion {if $form.formName eq 'Advanced' AND $cd_edit.collapse_adv_display eq 1}collapsed{/if}" id="{$cd_edit.name}" > | |
30 | <div class="crm-accordion-header"> | |
31 | {$cd_edit.title} | |
32 | </div> | |
33 | <div class="crm-accordion-body"> | |
34 | <table class="form-layout-compressed"> | |
35 | {foreach from=$cd_edit.fields item=element key=field_id} | |
6a488035 TO |
36 | {assign var="type" value=`$element.html_type`} |
37 | {assign var="element_name" value='custom_'|cat:$field_id} | |
3130209f | 38 | {assign var="operator_name" value='custom_'|cat:$field_id|cat:'_operator'} |
6a488035 TO |
39 | {if $element.is_search_range} |
40 | {assign var="element_name_from" value=$element_name|cat:"_from"} | |
41 | {assign var="element_name_to" value=$element_name|cat:"_to"} | |
42 | <tr> | |
0b77ccc2 | 43 | {if $element.data_type neq 'Date'} |
6a488035 TO |
44 | <td class="label">{$form.$element_name_from.label}</td><td> |
45 | {$form.$element_name_from.html|crmAddClass:six} | |
46 | {$form.$element_name_to.label} {$form.$element_name_to.html|crmAddClass:six} | |
0b77ccc2 CW |
47 | {elseif $element.skip_calendar NEQ true } |
48 | <td class="label"><label for='{$element_name}'>{$element.label}</label> | |
49 | {include file="CRM/Core/DateRange.tpl" fieldName=$element_name from='_from' to='_to'}</td><td> | |
50 | {/if} | |
6a488035 TO |
51 | {else} |
52 | <td class="label">{$form.$element_name.label}</td><td> | |
013ac5df | 53 | {$form.$element_name.html} |
3130209f | 54 | {if !empty($form.$operator_name)} |
9091c2a1 CW |
55 | <span class="crm-multivalue-search-op" for="{$element_name}">{$form.$operator_name.html}</span> |
56 | {assign var="add_multivalue_js" value=true} | |
3130209f | 57 | {/if} |
6a488035 | 58 | {/if} |
4a143c04 | 59 | {if $element.html_type eq 'Autocomplete-Select'} |
6a488035 TO |
60 | {if $element.data_type eq 'ContactReference'} |
61 | {include file="CRM/Custom/Form/ContactReference.tpl"} | |
6a488035 TO |
62 | {/if} |
63 | {/if} | |
64 | </td> | |
65 | </tr> | |
6a488035 TO |
66 | {/foreach} |
67 | </table> | |
68 | </div><!-- /.crm-accordion-body --> | |
69 | </div><!-- /.crm-accordion-wrapper --> | |
70 | ||
71 | {/foreach} | |
9091c2a1 CW |
72 | {if !empty($add_multivalue_js)} |
73 | {include file="CRM/Custom/Form/MultiValueSearch.js.tpl"} | |
74 | {/if} | |
6a488035 TO |
75 | {/if} |
76 |