Merge pull request #15306 from bhahumanists/bhahumanists-mailingID
[civicrm-core.git] / templates / CRM / Contribute / Form / Task / Invoice.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
9 *}
10 <div class="messages status no-popup">
11 <div class="icon inform-icon"></div>
12 {include file="CRM/Contribute/Form/Task.tpl"}
13 </div>
14 {if $selectedOutput ne 'email'}
15 <div class="help">
16 {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 <strong>Process Invoice(s)</strong> . 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&reg; Reader).{/ts}
17 </div>
18 {/if}
19
20 <table class="form-layout-compressed">
21 {if $selectedOutput ne 'email'}
22 <tr>
23 <td class="label">{$form.output.email_invoice.label}</td>
24 <td>{$form.output.email_invoice.html}</td>
25 </tr>
26 {/if}
27 <tr id="selectEmailFrom" style="display: none" class="crm-contactEmail-form-block-fromEmailAddress crm-email-element">
28 <td class="label">{$form.from_email_address.label}</td>
29 <td>{$form.from_email_address.html} {help id="id-from_email" file="CRM/Contact/Form/Task/Email.hlp" isAdmin=$isAdmin}</td>
30 </tr>
31 <tr class="crm-email-element">
32 <td class="label">{$form.email_comment.label}</td>
33 <td>{$form.email_comment.html}</td>
34 </tr>
35 {if $selectedOutput ne 'email'}
36 <tr>
37 <td class="label">{$form.output.pdf_invoice.label}</td>
38 <td>{$form.output.pdf_invoice.html}</td>
39 </tr>
40 {/if}
41 <tr class="crm-pdf-element">
42 <td class="label">{$form.pdf_format_id.label}</td>
43 <td>{$form.pdf_format_id.html}</td>
44 </tr>
45 </table>
46
47 <div class="spacer"></div>
48 <div class="crm-submit-buttons">
49 {$form.buttons.html}
50 </div>
51
52
53 <script type="text/javascript">
54 {literal}
55 CRM.$(function ($) {
56 var o = $('input[name="output"]');
57 if (o.length > 1) {
58 $('.crm-email-element').hide();
59 showhideEmailElements();
60 o.on('click', showhideEmailElements);
61 }
62 else {
63 $('.crm-email-element').show();
64 }
65
66 function showhideEmailElements() {
67 if ($('input[name="output"]:checked').val() == 'email_invoice') {
68 $('.crm-email-element').show();
69 $('.crm-pdf-element').hide();
70 }
71 else {
72 $('.crm-pdf-element').show();
73 $('.crm-email-element').hide();
74 }
75 }
76 });
77 {/literal}
78 </script>
79