Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
fee14197 | 3 | | CiviCRM version 5 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
6b83d5bd | 5 | | Copyright CiviCRM LLC (c) 2004-2019 | |
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 | {if !$printOnly} {* NO print section starts *} | |
27 | ||
b69e578b | 28 | {* build the print pdf buttons *} |
b69e578b | 29 | <div class="crm-tasks"> |
b69e578b CW |
30 | {assign var=group value="_qf_"|cat:$form.formName|cat:"_submit_group"} |
31 | {assign var=chart value="_qf_"|cat:$form.formName|cat:"_submit_chart"} | |
32 | <table style="border:0;"> | |
33 | <tr> | |
34 | <td> | |
35 | <table class="form-layout-compressed"> | |
36 | <tr> | |
87ecd5b7 | 37 | {include file="CRM/common/tasks.tpl" location="botton"} |
b69e578b CW |
38 | {if $instanceUrl} |
39 | <td> » <a href="{$instanceUrl}">{ts}Existing report(s) from this template{/ts}</a></td> | |
40 | {/if} | |
41 | </tr> | |
42 | </table> | |
43 | </td> | |
44 | <td> | |
45 | <table class="form-layout-compressed" align="right"> | |
46 | {if $chartSupported} | |
47 | <tr> | |
48 | <td>{$form.charts.html|crmAddClass:big}</td> | |
49 | <td align="right">{$form.$chart.html}</td> | |
50 | </tr> | |
51 | {/if} | |
52 | {if $form.groups} | |
53 | <tr> | |
54 | <td> | |
55 | {$form.groups.html}{$form.$group.html} | |
56 | <script type="text/javascript"> | |
57 | {literal} | |
58 | (function($) { | |
59 | $('#groups').val('').change(function() { | |
60 | CRM.confirm({ | |
61 | message: ts({/literal}'{ts escape='js' 1='<em>%1</em>'}Add all contacts to %1 group?{/ts}'{literal}, {1: $('option:selected', '#groups').text()}) | |
62 | }) | |
63 | .on({ | |
64 | 'crmConfirm:yes': function() { | |
65 | $('#groups').siblings(':submit').click(); | |
66 | }, | |
67 | 'crmConfirm:no dialogclose': function() { | |
68 | $('#groups').select2('val', ''); | |
69 | } | |
70 | }); | |
71 | }); | |
72 | })(CRM.$); | |
73 | {/literal} | |
74 | </script> | |
75 | </td> | |
76 | </tr> | |
77 | {/if} | |
78 | </table> | |
79 | </td> | |
80 | </tr> | |
81 | </table> | |
82 | </div> | |
6a488035 | 83 | |
b69e578b CW |
84 | {literal} |
85 | <script type="text/javascript"> | |
22b67281 CW |
86 | CRM.$(function($) { |
87 | // Disable print/pdf output of charts | |
88 | $('select[name=charts]', 'form.crm-report-form').change(function() { | |
89 | var viewType = $(this).val(), | |
90 | flashChartType = '{/literal}{if $chartType}{$chartType}{else}{/if}{literal}'; | |
91 | $('#_qf_Summary_submit_pdf, #_qf_Summary_submit_print').prop('disabled', (viewType && flashChartType != viewType)); | |
92 | }); | |
93 | }); | |
b69e578b CW |
94 | </script> |
95 | {/literal} | |
6a488035 | 96 | {/if} {* NO print section ends *} |