fix year in headers
[civicrm-core.git] / templates / CRM / Custom / Form / Search.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2017 |
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}
36 {assign var="type" value=`$element.html_type`}
37 {assign var="element_name" value='custom_'|cat:$field_id}
38 {assign var="operator_name" value='custom_'|cat:$field_id|cat:'_operator'}
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>
43 {if $element.data_type neq 'Date'}
44 <td class="label">{$form.$element_name_from.label}</td><td>
45 {$form.$element_name_from.html|crmAddClass:six}
46 &nbsp;&nbsp;{$form.$element_name_to.label}&nbsp;&nbsp;{$form.$element_name_to.html|crmAddClass:six}
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}
51 {else}
52 <td class="label">{$form.$element_name.label}</td><td>
53 {$form.$element_name.html}
54 {if !empty($form.$operator_name)}
55 <span class="crm-multivalue-search-op" for="{$element_name}">{$form.$operator_name.html}</span>
56 {assign var="add_multivalue_js" value=true}
57 {/if}
58 {/if}
59 {if $element.html_type eq 'Autocomplete-Select'}
60 {if $element.data_type eq 'ContactReference'}
61 {include file="CRM/Custom/Form/ContactReference.tpl"}
62 {/if}
63 {/if}
64 </td>
65 </tr>
66 {/foreach}
67 </table>
68 </div><!-- /.crm-accordion-body -->
69 </div><!-- /.crm-accordion-wrapper -->
70
71 {/foreach}
72 {if !empty($add_multivalue_js)}
73 {include file="CRM/Custom/Form/MultiValueSearch.js.tpl"}
74 {/if}
75 {/if}
76