Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
39de6fd5 | 3 | | CiviCRM version 4.6 | |
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 | *} | |
70b1b945 | 26 | <div id="report-tab-format" class="civireport-criteria"> |
b69e578b | 27 | <table class="form-layout"> |
6a488035 | 28 | <tr class="crm-report-instanceForm-form-block-title"> |
cd732070 | 29 | <td class="report-label" width="20%">{$form.title.label} {help id="id-report_title" file="CRM/Report/Form/Tabs/Settings.hlp"}</td> |
b69e578b | 30 | <td >{$form.title.html}</td> |
6a488035 TO |
31 | </tr> |
32 | <tr class="crm-report-instanceForm-form-block-description"> | |
b69e578b CW |
33 | <td class="report-label" width="20%">{$form.description.label}</td> |
34 | <td>{$form.description.html}</td> | |
6a488035 TO |
35 | </tr> |
36 | <tr class="crm-report-instanceForm-form-block-report_header"> | |
cd732070 | 37 | <td class="report-label" width="20%">{$form.report_header.label}{help id="id-report_header" file="CRM/Report/Form/Tabs/Settings.hlp"}</td> |
b69e578b | 38 | <td>{$form.report_header.html}</td> |
6a488035 TO |
39 | </tr> |
40 | <tr class="crm-report-instanceForm-form-block-report_footer"> | |
b69e578b CW |
41 | <td class="report-label" width="20%">{$form.report_footer.label}</td> |
42 | <td>{$form.report_footer.html}</td> | |
6a488035 | 43 | </tr> |
b69e578b | 44 | </table> |
841cb24e | 45 | </div> |
6a488035 | 46 | |
f1c9651b | 47 | <div id="report-tab-email" class="civireport-criteria"> |
cd732070 | 48 | <h3 class="email-delivery-settings-title">{ts}Email Delivery Settings{/ts} {help id="id-email_settings" file="CRM/Report/Form/Tabs/Settings.hlp"}</h3> |
841cb24e | 49 | <table class="form-layout email-delivery-settings-fields"> |
6a488035 | 50 | <tr class="crm-report-instanceForm-form-block-email_subject"> |
b69e578b CW |
51 | <td class="report-label" width="20%">{$form.email_subject.label}</td> |
52 | <td>{$form.email_subject.html|crmAddClass:huge}</td> | |
6a488035 TO |
53 | </tr> |
54 | <tr class="crm-report-instanceForm-form-block-email_to"> | |
b69e578b CW |
55 | <td class="report-label">{$form.email_to.label}</td> |
56 | <td>{$form.email_to.html|crmAddClass:huge}</td> | |
6a488035 TO |
57 | </tr> |
58 | <tr class="crm-report-instanceForm-form-block-email_cc"> | |
b69e578b CW |
59 | <td class="report-label">{$form.email_cc.label}</td> |
60 | <td>{$form.email_cc.html|crmAddClass:huge}</td> | |
6a488035 | 61 | </tr> |
b69e578b | 62 | </table> |
841cb24e | 63 | </div> |
6a488035 | 64 | |
70b1b945 | 65 | <div id="report-tab-access" class="civireport-criteria"> |
b69e578b | 66 | <table class="form-layout"> |
6a488035 | 67 | <tr class="crm-report-instanceForm-form-block-is_navigation"> |
b69e578b CW |
68 | <td class="report-label">{$form.is_navigation.label}</td> |
69 | <td>{$form.is_navigation.html}<br /> | |
70 | <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> | |
71 | </td> | |
6a488035 TO |
72 | </tr> |
73 | <tr class="crm-report-instanceForm-form-block-parent_id" id="navigation_menu"> | |
b69e578b CW |
74 | <td class="report-label">{$form.parent_id.label} {help id="id-parent" file="CRM/Admin/Form/Navigation.hlp"}</td> |
75 | <td>{$form.parent_id.html|crmAddClass:huge}</td> | |
6a488035 TO |
76 | </tr> |
77 | <tr class="crm-report-instanceForm-form-block-drilldown"> | |
78 | <td class="report-label">{$form.drilldown_id.label}</td> | |
79 | <td>{$form.drilldown_id.html}</td> | |
80 | </tr> | |
81 | {if $config->userFramework neq 'Joomla'} | |
b69e578b | 82 | <tr class="crm-report-instanceForm-form-block-permission"> |
cd732070 | 83 | <td class="report-label" width="20%">{$form.permission.label} {help id="id-report_perms" file="CRM/Report/Form/Tabs/Settings.hlp"}</td> |
b69e578b CW |
84 | <td>{$form.permission.html|crmAddClass:huge}</td> |
85 | </tr> | |
86 | <tr class="crm-report-instanceForm-form-block-role"> | |
87 | <td class="report-label" width="20%">{$form.grouprole.label}</td> | |
88 | <td>{$form.grouprole.html|crmAddClass:huge}</td> | |
89 | </tr> | |
6a488035 TO |
90 | {/if} |
91 | <tr class="crm-report-instanceForm-form-block-isReserved"> | |
cd732070 | 92 | <td class="report-label">{$form.is_reserved.label} {help id="id-is_reserved" file="CRM/Report/Form/Tabs/Settings.hlp"}</td> |
6a488035 TO |
93 | <td>{$form.is_reserved.html} |
94 | <span class="description">{ts}If reserved, only users with 'administer reserved reports' permission can modify this report instance.{/ts}</span> | |
95 | </td> | |
96 | </tr> | |
97 | <tr class="crm-report-instanceForm-form-block-addToDashboard"> | |
cd732070 | 98 | <td class="report-label">{$form.addToDashboard.label} {help id="id-dash_avail" file="CRM/Report/Form/Tabs/Settings.hlp"}</td> |
6a488035 TO |
99 | <td>{$form.addToDashboard.html} |
100 | <span class="description">{ts}Users with appropriate permissions can add this report to their dashboard.{/ts}</span> | |
101 | </td> | |
102 | </tr> | |
dbb4a0f9 | 103 | <tr id ="limit_result" class="crm-report-instanceForm-form-block-limitUser"> |
cd732070 | 104 | <td class="report-label">{$form.row_count.label} {help id="id-dash_limit" file="CRM/Report/Form/Tabs/Settings.hlp"}</td> |
dbb4a0f9 PN |
105 | <td>{$form.row_count.html}</td> |
106 | </tr> | |
b69e578b | 107 | </table> |
841cb24e | 108 | </div> |
6a488035 TO |
109 | |
110 | {include file="CRM/common/showHideByFieldValue.tpl" | |
111 | trigger_field_id ="is_navigation" | |
112 | trigger_value ="" | |
113 | target_element_id ="navigation_menu" | |
114 | target_element_type ="table-row" | |
115 | field_type ="radio" | |
116 | invert = 0 | |
117 | } | |
dbb4a0f9 PN |
118 | {include file="CRM/common/showHideByFieldValue.tpl" |
119 | trigger_field_id ="addToDashboard" | |
120 | trigger_value ="" | |
121 | target_element_id ="limit_result" | |
122 | target_element_type ="table-row" | |
123 | field_type ="radio" | |
124 | invert = 0 | |
125 | } | |
6a488035 TO |
126 | |
127 | {if $is_navigation} | |
b69e578b CW |
128 | <script type="text/javascript"> |
129 | document.getElementById('is_navigation').checked = true; | |
130 | showHideByValue('is_navigation','','navigation_menu','table-row','radio',false); | |
131 | </script> | |
6a488035 TO |
132 | {/if} |
133 | ||
134 | {literal} | |
135 | <script type="text/javascript"> | |
3cc60a06 | 136 | CRM.$(function($) { |
d5fd09f1 CW |
137 | var confirmed = false, |
138 | formName = {/literal}"{$form.formName}"{literal}; | |
139 | $('#_qf_' + formName + '_submit_next, #_qf_' + formName + '_submit_save').click(function() { | |
b69e578b CW |
140 | if ($('#is_navigation').prop('checked') && $('#parent_id').val() == '') { |
141 | 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} | |
142 | return confirm(confirmMsg); | |
143 | } | |
144 | }); | |
d5fd09f1 CW |
145 | // Pop-up confirmation when clicking "Save a copy" (submit_next) or "Create Report" (submit_save) |
146 | var saveAction = $('#_qf_' + formName + '_submit_next').length ? 'next' : 'save'; | |
147 | $('#_qf_' + formName + '_submit_' + saveAction).click(function(e) { | |
148 | if (!confirmed) { | |
149 | var $button = $(this), | |
150 | title = 'tr.crm-report-instanceForm-form-block-title', | |
151 | description = 'tr.crm-report-instanceForm-form-block-description'; | |
2d7d6c3a | 152 | $(title).find($("input[id='title']")).attr('value', $("input[id='title']").val()); |
153 | $(description).find($("input[id='description']")).attr('value', $("input[id='description']").val()); | |
d5fd09f1 CW |
154 | e.preventDefault(); |
155 | e.stopImmediatePropagation(); | |
156 | CRM.confirm({ | |
157 | title: $(this).attr('value'), | |
158 | message: '<table class="form-layout"><tr>' + $(title).html() + '</tr><tr>' + $(description).html() + '</tr></table>', | |
159 | open: function() { | |
160 | var $name = $('[name=title]', this); | |
161 | if (saveAction == 'next') { | |
162 | $name.val('' + $name.val() + ' ' + {/literal}'{ts escape='js'}(copy){/ts}'{literal}) | |
163 | } | |
164 | } | |
165 | }) | |
166 | .on('crmConfirm:yes', function() { | |
167 | confirmed = true; | |
168 | $('[name=title]', '#' + formName).val($('[name=title]', this).val()); | |
169 | $('[name=description]', '#' + formName).val($('[name=description]', this).val()); | |
170 | $button.click(); | |
2d7d6c3a | 171 | }) |
172 | .on('crmConfirm:no', function() { | |
173 | $popUpTitle = $("div.crm-confirm-dialog input[id='title']") | |
174 | $popUpDescription = $("div.crm-confirm-dialog input[id='description']") | |
175 | $(title).find($("input[id='title']")).val($popUpTitle.val()); | |
176 | $(description).find($("input[id='description']")).val($popUpDescription.val()); | |
d5fd09f1 | 177 | }); |
b69e578b CW |
178 | } |
179 | }); | |
6a488035 TO |
180 | }); |
181 | </script> | |
182 | {/literal} |