Merge pull request #11241 from mattwire/CRM-21392_find_groups_viewcomponents
[civicrm-core.git] / templates / CRM / Report / Form / Fields.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2018 |
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 !$printOnly} {* NO print section starts *}
27 {if $criteriaForm}
28 <div class="crm-report-criteria"> {* criteria section starts *}
29 <div id="mainTabContainer">
30 {*tab navigation bar*}
31 <ul>
32 {foreach from=$tabs item='tab'}
33 <li class="ui-corner-all">
34 <a title="{$tab.title|escape}" href="#report-tab-{$tab.div_label}">{$tab.title}</a>
35 </li>
36 {/foreach}
37 {if $instanceForm OR $instanceFormError}
38 <li id="tab_settings" class="ui-corner-all">
39 <a title="{ts}Title and Format{/ts}" href="#report-tab-format">{ts}Title and Format{/ts}</a>
40 </li>
41 <li class="ui-corner-all">
42 <a title="{ts}Email Delivery{/ts}" href="#report-tab-email">{ts}Email Delivery{/ts}</a>
43 </li>
44 <li class="ui-corner-all">
45 <a title="{ts}Access{/ts}" href="#report-tab-access">{ts}Access{/ts}</a>
46 </li>
47 {/if}
48 </ul>
49
50 {*criteria*}
51 {include file="CRM/Report/Form/Criteria.tpl"}
52
53 {*settings*}
54 {if $instanceForm OR $instanceFormError}
55 {include file="CRM/Report/Form/Tabs/Instance.tpl"}
56 {/if}
57 </div> {* end mainTabContainer *}
58
59 <div class="crm-submit-buttons">
60 {$form.buttons.html}
61 </div>
62 </div> {* criteria section ends *}
63 {/if}
64
65 {literal}
66 <script type="text/javascript">
67 CRM.$(function($) {
68 var tabSettings = {
69 collapsible: true,
70 active: {/literal}{if $rows}false{else}0{/if}{literal}
71 };
72 // If a tab contains an error, open it
73 if ($('.civireport-criteria .crm-error', '#mainTabContainer').length) {
74 tabSettings.active = $('.civireport-criteria').index($('.civireport-criteria:has(".crm-error")')[0]);
75 }
76 $("#mainTabContainer").tabs(tabSettings);
77 });
78
79 </script>
80 {/literal}
81
82 {/if} {* NO print section ends *}