CRM-14383 - Update cj closures
[civicrm-core.git] / templates / CRM / Report / Form / Instance.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
819d0d41 3 | CiviCRM version 4.5 |
6a488035 4 +--------------------------------------------------------------------+
819d0d41 5 | Copyright CiviCRM LLC (c) 2004-2014 |
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<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</table>
103
104{include file="CRM/common/showHideByFieldValue.tpl"
105 trigger_field_id ="is_navigation"
106 trigger_value =""
107 target_element_id ="navigation_menu"
108 target_element_type ="table-row"
109 field_type ="radio"
110 invert = 0
111}
112
113{if $is_navigation}
114 <script type="text/javascript">
115 document.getElementById('is_navigation').checked = true;
116 showHideByValue('is_navigation','','navigation_menu','table-row','radio',false);
117 </script>
118{/if}
119
120{literal}
121<script type="text/javascript">
122 cj(document).ready(function() {
123 cj('#title').data('initial_value', cj('#title').val());
124 });
3cc60a06 125 CRM.$(function($) {
6a488035
TO
126 var formName = {/literal}"{$form.formName}"{literal};
127 cj('#_qf_' + formName + '_submit_save').click (
128 function(){
8539f25d 129 if ( cj('#is_navigation').prop('checked') && cj('#parent_id').val() == '') {
6a488035
TO
130 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}
131 return confirm(confirmMsg);
132 }
133 }
134 );
135 cj('#_qf_' + formName + '_submit_next').click (
136 function(){
137 if ( cj('#title').data('initial_value') == cj('#title').val() ) {
138 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}
139 return confirm(confirmMsg);
140 }
141 }
142 );
143 });
144</script>
145{/literal}