Merge pull request #3598 from totten/master-unsavedChanges
[civicrm-core.git] / templates / CRM / Report / Form / Instance.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
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 <h3>{ts}General Settings{/ts}</h3>
27 <table class="form-layout">
28 <tr class="crm-report-instanceForm-form-block-title">
29 <td class="report-label" width="20%">{$form.title.label} {help id="id-report_title" file="CRM/Report/Form/Settings.hlp"}</td>
30 <td >{$form.title.html}</td>
31 </tr>
32 <tr class="crm-report-instanceForm-form-block-description">
33 <td class="report-label" width="20%">{$form.description.label}</td>
34 <td>{$form.description.html}</td>
35 </tr>
36 <tr class="crm-report-instanceForm-form-block-report_header">
37 <td class="report-label" width="20%">{$form.report_header.label}{help id="id-report_header" file="CRM/Report/Form/Settings.hlp"}</td>
38 <td>{$form.report_header.html}</td>
39 </tr>
40 <tr class="crm-report-instanceForm-form-block-report_footer">
41 <td class="report-label" width="20%">{$form.report_footer.label}</td>
42 <td>{$form.report_footer.html}</td>
43 </tr>
44 </table>
45 <br/>
46
47 <h3>{ts}Email Delivery Settings{/ts} {help id="id-email_settings" file="CRM/Report/Form/Settings.hlp"}</h3>
48 <table class="form-layout">
49 <tr class="crm-report-instanceForm-form-block-email_subject">
50 <td class="report-label" width="20%">{$form.email_subject.label}</td>
51 <td>{$form.email_subject.html|crmAddClass:huge}</td>
52 </tr>
53 <tr class="crm-report-instanceForm-form-block-email_to">
54 <td class="report-label">{$form.email_to.label}</td>
55 <td>{$form.email_to.html|crmAddClass:huge}</td>
56 </tr>
57 <tr class="crm-report-instanceForm-form-block-email_cc">
58 <td class="report-label">{$form.email_cc.label}</td>
59 <td>{$form.email_cc.html|crmAddClass:huge}</td>
60 </tr>
61 </table>
62 <br/>
63
64 <h3>{ts}Other Settings{/ts}</h3>
65 <table class="form-layout">
66 <tr class="crm-report-instanceForm-form-block-is_navigation">
67 <td class="report-label">{$form.is_navigation.label}</td>
68 <td>{$form.is_navigation.html}<br />
69 <span class="description">{ts}All report instances are automatically included in the Report Listing page. Check this box to also add this report to the navigation menu.{/ts}</span>
70 </td>
71 </tr>
72 <tr class="crm-report-instanceForm-form-block-parent_id" id="navigation_menu">
73 <td class="report-label">{$form.parent_id.label} {help id="id-parent" file="CRM/Admin/Form/Navigation.hlp"}</td>
74 <td>{$form.parent_id.html|crmAddClass:huge}</td>
75 </tr>
76 <tr class="crm-report-instanceForm-form-block-drilldown">
77 <td class="report-label">{$form.drilldown_id.label}</td>
78 <td>{$form.drilldown_id.html}</td>
79 </tr>
80 {if $config->userFramework neq 'Joomla'}
81 <tr class="crm-report-instanceForm-form-block-permission">
82 <td class="report-label" width="20%">{$form.permission.label} {help id="id-report_perms" file="CRM/Report/Form/Settings.hlp"}</td>
83 <td>{$form.permission.html|crmAddClass:huge}</td>
84 </tr>
85 <tr class="crm-report-instanceForm-form-block-role">
86 <td class="report-label" width="20%">{$form.grouprole.label}</td>
87 <td>{$form.grouprole.html|crmAddClass:huge}</td>
88 </tr>
89 {/if}
90 <tr class="crm-report-instanceForm-form-block-isReserved">
91 <td class="report-label">{$form.is_reserved.label} {help id="id-is_reserved" file="CRM/Report/Form/Settings.hlp"}</td>
92 <td>{$form.is_reserved.html}
93 <span class="description">{ts}If reserved, only users with 'administer reserved reports' permission can modify this report instance.{/ts}</span>
94 </td>
95 </tr>
96 <tr class="crm-report-instanceForm-form-block-addToDashboard">
97 <td class="report-label">{$form.addToDashboard.label} {help id="id-dash_avail" file="CRM/Report/Form/Settings.hlp"}</td>
98 <td>{$form.addToDashboard.html}
99 <span class="description">{ts}Users with appropriate permissions can add this report to their dashboard.{/ts}</span>
100 </td>
101 </tr>
102 <tr id ="limit_result" class="crm-report-instanceForm-form-block-limitUser">
103 <td class="report-label">{$form.row_count.label} {help id="id-dash_limit" file="CRM/Report/Form/Settings.hlp"}</td>
104 <td>{$form.row_count.html}</td>
105 </tr>
106 </table>
107
108 {include file="CRM/common/showHideByFieldValue.tpl"
109 trigger_field_id ="is_navigation"
110 trigger_value =""
111 target_element_id ="navigation_menu"
112 target_element_type ="table-row"
113 field_type ="radio"
114 invert = 0
115 }
116 {include file="CRM/common/showHideByFieldValue.tpl"
117 trigger_field_id ="addToDashboard"
118 trigger_value =""
119 target_element_id ="limit_result"
120 target_element_type ="table-row"
121 field_type ="radio"
122 invert = 0
123 }
124
125 {if $is_navigation}
126 <script type="text/javascript">
127 document.getElementById('is_navigation').checked = true;
128 showHideByValue('is_navigation','','navigation_menu','table-row','radio',false);
129 </script>
130 {/if}
131
132 {literal}
133 <script type="text/javascript">
134 cj(document).ready(function() {
135 cj('#title').data('initial_value', cj('#title').val());
136 });
137 CRM.$(function($) {
138 var formName = {/literal}"{$form.formName}"{literal};
139 cj('#_qf_' + formName + '_submit_save').click (
140 function(){
141 if ( cj('#is_navigation').prop('checked') && cj('#parent_id').val() == '') {
142 var confirmMsg = {/literal}'{ts escape="js"}You have chosen to include this report in the Navigation Menu without selecting a Parent Menu item from the dropdown. This will add the report to the top level menu bar. Are you sure you want to continue?{/ts}'{literal}
143 return confirm(confirmMsg);
144 }
145 }
146 );
147 cj('#_qf_' + formName + '_submit_next').click (
148 function(){
149 if ( cj('#title').data('initial_value') == cj('#title').val() ) {
150 var confirmMsg = {/literal}'{ts escape="js"}You are saving a copy of this report with the same report title. Are you sure you want to continue?{/ts}'{literal}
151 return confirm(confirmMsg);
152 }
153 }
154 );
155 });
156 </script>
157 {/literal}