Commit | Line | Data |
---|---|---|
b8df2a80 RK |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
39de6fd5 | 3 | | CiviCRM version 4.6 | |
b8df2a80 RK |
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 | <div class="messages status no-popup"> | |
27 | <div class="icon inform-icon"></div> | |
830b3e83 | 28 | {include file="CRM/Contribute/Form/Task.tpl"} |
b8df2a80 | 29 | </div> |
830b3e83 | 30 | {if $selectedOutput ne 'email'} |
31 | <div id="help"> | |
32 | {ts}You may choose to email invoice to contributors OR download a PDF file containing one invoice per page to your local computer by clicking | |
33 | <strong>Process Invoice(s)</strong> | |
34 | . Your browser may display the file for you automatically, or you may need to open it for printing using any PDF reader (such as Adobe® Reader).{/ts} | |
35 | </div> | |
6efffa5d | 36 | {/if} |
b8df2a80 | 37 | |
830b3e83 | 38 | <table class="form-layout-compressed"> |
39 | {if $selectedOutput ne 'email'} | |
6efffa5d PB |
40 | <tr> |
41 | <td>{$form.output.email_invoice.html}</td> | |
42 | </tr> | |
43 | {/if} | |
830b3e83 | 44 | <tr class="crm-email-element"> |
6efffa5d | 45 | <td>{$form.from_email_address.label}{$form.from_email_address.html}{help id ="id-from_email" isAdmin=$isAdmin}</td> |
b8df2a80 | 46 | </tr> |
830b3e83 | 47 | <tr class="crm-email-element"> |
6efffa5d | 48 | <td>{$form.email_comment.label}{$form.email_comment.html}</td> |
b8df2a80 | 49 | </tr> |
830b3e83 | 50 | {if $selectedOutput ne 'email'} |
6efffa5d PB |
51 | <tr> |
52 | <td>{$form.output.pdf_invoice.html}</td> | |
53 | </tr> | |
54 | {/if} | |
830b3e83 | 55 | <tr class="crm-pdf-element"> |
b8df2a80 RK |
56 | <td>{$form.pdf_format_id.html} {$form.pdf_format_id.label} </td> |
57 | </tr> | |
58 | </table> | |
59 | ||
60 | <div class="spacer"></div> | |
61 | <div class="form-item"> | |
830b3e83 | 62 | {$form.buttons.html} |
b8df2a80 | 63 | </div> |
830b3e83 | 64 | |
65 | ||
66 | <script type="text/javascript"> | |
67 | {literal} | |
68 | CRM.$(function ($) { | |
69 | var o = $('input[name="output"]'); | |
70 | if (o.length > 1) { | |
71 | $('.crm-email-element').hide(); | |
72 | showhideEmailElements(); | |
73 | o.on('click', showhideEmailElements); | |
74 | } | |
75 | else { | |
76 | $('.crm-email-element').show(); | |
77 | } | |
78 | ||
79 | function showhideEmailElements() { | |
80 | if ($('input[name="output"]:checked').val() == 'email_invoice') { | |
81 | $('.crm-email-element').show(); | |
82 | $('.crm-pdf-element').hide(); | |
83 | } | |
84 | else { | |
85 | $('.crm-pdf-element').show(); | |
86 | $('.crm-email-element').hide(); | |
87 | } | |
88 | } | |
89 | }); | |
90 | {/literal} | |
91 | </script> | |
92 |