2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
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. |
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. |
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 +--------------------------------------------------------------------+
26 <div class="crm-block crm-form-block crm-contactEmail-form-block">
27 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
28 {if $suppressedEmails > 0}
30 <p>{ts count=$suppressedEmails plural='Email will NOT be sent to %count contacts - (no email address on file, or communication preferences specify DO NOT EMAIL, or contact is deceased).'}Email will NOT be sent to %count contact - (no email address on file, or communication preferences specify DO NOT EMAIL, or contact is deceased).{/ts}</p>
33 <table class="form-layout-compressed">
34 <tr class="crm-contactEmail-form-block-fromEmailAddress">
35 <td class="label">{$form.fromEmailAddress.label}</td>
36 <td>{$form.fromEmailAddress.html} {help id="id-from_email" file="CRM/Contact/Form/Task/Email.hlp" isAdmin=$isAdmin}</td>
38 <tr class="crm-contactEmail-form-block-recipient">
39 <td class="label">{if $single eq false}{ts}Recipient(s){/ts}{else}{$form.to.label}{/if}</td>
40 <td>{$form.to.html}{if $noEmails eq true} {$form.emailAddress.html}{/if}
41 <div class="spacer"></div>
42 <span class="bold"><a href="#" id="addcc">{ts}Add CC{/ts}</a> | <a href="#" id="addbcc">{ts}Add BCC{/ts}</a></span>
45 <tr class="crm-contactEmail-form-block-cc_id" id="cc" {if ! $form.cc_id.value}style="display:none;"{/if}>
46 <td class="label">{$form.cc_id.label}</td><td>{$form.cc_id.html}</td>
48 <tr class="crm-contactEmail-form-block-bcc_id" id="bcc" {if ! $form.bcc_id.value}style="display:none;"{/if}>
49 <td class="label">{$form.bcc_id.label}</td><td>{$form.bcc_id.html}</td>
53 <tr class="crm-contactEmail-form-block-template">
54 <td class="label">{$form.template.label}</td>
55 <td>{$form.template.html}</td>
58 <tr class="crm-contactEmail-form-block-subject">
59 <td class="label">{$form.subject.label}</td>
61 {$form.subject.html|crmAddClass:huge}
62 <input class="crm-token-selector big" data-field="subject" />
63 {help id="id-token-subject" tplFile=$tplFile isAdmin=$isAdmin file="CRM/Contact/Form/Task/Email.hlp"}
68 {include file="CRM/Contact/Form/Task/EmailCommon.tpl"}
70 <div class="spacer"> </div>
73 {include file="CRM/Contact/Form/Task.tpl"}
75 {if $suppressedEmails > 0}
76 {ts count=$suppressedEmails plural='Email will NOT be sent to %count contacts.'}Email will NOT be sent to %count contact.{/ts}
78 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
80 <script type="text/javascript">
81 var toContact = ccContact = bccContact = '';
84 toContact = {$toContact};
88 ccContact = {$ccContact};
92 bccContact = {$bccContact};
97 cj('#addcc').toggle( function() { cj(this).text('Remove CC');
98 cj('tr#cc').show().find('ul').find('input').focus();
99 },function() { cj(this).text('Add CC');cj('#cc_id').val('');
100 cj('tr#cc ul li:not(:last)').remove();cj('#cc').hide();
102 cj('#addbcc').toggle( function() { cj(this).text('Remove BCC');
103 cj('tr#bcc').show().find('ul').find('input').focus();
104 },function() { cj(this).text('Add BCC');cj('#bcc_id').val('');
105 cj('tr#bcc ul li:not(:last)').remove();cj('#bcc').hide();
108 var sourceDataUrl = "{/literal}{crmURL p='civicrm/ajax/checkemail' q='id=1' h=0 }{literal}";
110 function emailSelect(el){
111 $(el).data('api-entity', 'contact').crmSelect2({
112 minimumInputLength: 1,
116 data: function(term) {
121 results: function(response) {
130 emailSelect('#cc_id');
131 emailSelect('#bcc_id');
137 {include file="CRM/common/formNavigate.tpl"}