Ian province abbreviation patch - issue 724
[civicrm-core.git] / templates / CRM / Custom / Form / Search.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
2c4c49ca 3 | CiviCRM version 4.7 |
6a488035 4 +--------------------------------------------------------------------+
e7112fa7 5 | Copyright CiviCRM LLC (c) 2004-2015 |
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>
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">{$form.$element_name_from.label}</td><td>
49 {include file="CRM/common/jcalendar.tpl" elementName=$element_name_from}
50 &nbsp;&nbsp;{$form.$element_name_to.label}&nbsp;&nbsp;
51 {include file="CRM/common/jcalendar.tpl" elementName=$element_name_to}
52 {/if}
53 {else}
54 <td class="label">{$form.$element_name.label}</td><td>
55 {if $element.data_type neq 'Date'}
56 {$form.$element_name.html}
57 {elseif $element.skip_calendar NEQ true }
58 {include file="CRM/common/jcalendar.tpl" elementName=$element_name}
59 {/if}
3130209f 60 {if !empty($form.$operator_name)}
9091c2a1
CW
61 <span class="crm-multivalue-search-op" for="{$element_name}">{$form.$operator_name.html}</span>
62 {assign var="add_multivalue_js" value=true}
3130209f 63 {/if}
6a488035 64 {/if}
4a143c04 65 {if $element.html_type eq 'Autocomplete-Select'}
6a488035
TO
66 {if $element.data_type eq 'ContactReference'}
67 {include file="CRM/Custom/Form/ContactReference.tpl"}
6a488035
TO
68 {/if}
69 {/if}
70 </td>
71 </tr>
6a488035
TO
72 {/foreach}
73 </table>
74 </div><!-- /.crm-accordion-body -->
75 </div><!-- /.crm-accordion-wrapper -->
76
77{/foreach}
9091c2a1
CW
78 {if !empty($add_multivalue_js)}
79 {include file="CRM/Custom/Form/MultiValueSearch.js.tpl"}
80 {/if}
6a488035
TO
81{/if}
82