Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
2c4c49ca | 3 | | CiviCRM version 4.7 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
2a73d3b0 | 5 | | Copyright CiviCRM LLC (c) 2004-2017 | |
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 | {* Report form criteria section *} | |
6a488035 | 27 | |
50951061 | 28 | {foreach from=$tabs item=tab} |
0b62c1ab EM |
29 | {assign var = 'region' value = "report-tab"|cat:$tab.div_label} |
30 | {assign var = 'fileName' value = "CRM/Report/Form/Tabs/"|cat:$tab.tpl|cat:".tpl"} | |
50951061 EM |
31 | {crmRegion name=$region} |
32 | {include file=$fileName} | |
33 | {/crmRegion} | |
34 | {/foreach} | |
6a488035 | 35 | |
50951061 | 36 | {literal} |
b69e578b | 37 | <script type="text/javascript"> |
50951061 EM |
38 | {/literal} |
39 | {foreach from=$filters item=table key=tableName} | |
40 | {foreach from=$table item=field key=fieldName} | |
41 | {literal}var val = "dnc";{/literal} | |
42 | {assign var=fieldOp value=$fieldName|cat:"_op"} | |
43 | {if !($field.operatorType & 4) && !$field.no_display && $form.$fieldOp.html} | |
44 | {literal}var val = document.getElementById("{/literal}{$fieldOp}{literal}").value;{/literal} | |
6a488035 | 45 | {/if} |
50951061 EM |
46 | {literal}showHideMaxMinVal( "{/literal}{$fieldName}{literal}", val );{/literal} |
47 | {/foreach} | |
48 | {/foreach} | |
6a488035 | 49 | |
50951061 EM |
50 | {literal} |
51 | function showHideMaxMinVal( field, val ) { | |
52 | var fldVal = field + "_value_cell"; | |
53 | var fldMinMax = field + "_min_max_cell"; | |
54 | if ( val == "bw" || val == "nbw" ) { | |
55 | cj('#' + fldVal ).hide(); | |
56 | cj('#' + fldMinMax ).show(); | |
57 | } else if (val =="nll" || val == "nnll") { | |
58 | cj('#' + fldVal).hide() ; | |
59 | cj('#' + field + '_value').val(''); | |
60 | cj('#' + fldMinMax ).hide(); | |
61 | } else { | |
62 | cj('#' + fldVal ).show(); | |
63 | cj('#' + fldMinMax ).hide(); | |
b69e578b | 64 | } |
50951061 | 65 | } |
6a488035 | 66 | |
50951061 EM |
67 | CRM.$(function($) { |
68 | $('.crm-report-criteria-groupby input:checkbox').click(function() { | |
69 | $('#fields_' + this.id.substr(10)).prop('checked', this.checked); | |
70 | }); | |
71 | {/literal}{if $displayToggleGroupByFields}{literal} | |
ae8f569f CW |
72 | $('.crm-report-criteria-field input:checkbox').click(function() { |
73 | $('#group_bys_' + this.id.substr(7)).prop('checked', this.checked); | |
4afed912 DS |
74 | }); |
75 | {/literal}{/if}{literal} | |
76 | }); | |
b69e578b CW |
77 | </script> |
78 | {/literal} |