commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-new / civicrm / templates / CRM / Contact / Form / Task / SMS.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.6 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2015 |
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="crm-block crm-form-block crm-contactSMS-form-block">
27 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
28 {if $suppressedSms > 0}
29 <div class="status">
30 <p>{ts count=$suppressedSms plural='SMS will NOT be sent to %count contacts - (no phone number on file, or communication preferences specify DO NOT SMS, or contact is deceased).'}SMS will NOT be sent to %count contact - (no phone number on file, or communication preferences specify DO NOT SMS, or contact is deceased).{/ts}</p>
31 </div>
32 {/if}
33 {if $extendTargetContacts > 0}
34 <div class="status">
35 <p>{ts count=$extendTargetContacts plural='SMS will NOT be sent to contacts of %count Activities - (there are more than one Target contact).'}SMS will NOT be sent to contacts of %count Activity - (there are more than one Target contact).{/ts}</p>
36 </div>
37 {/if}
38 {if $invalidActivity > 0}
39 <div class="status"><p>
40 {ts count=$invalidActivity plural='SMS will NOT be sent to contacts of %count selected activities as they are invalid for this task action.'}SMS will NOT be sent to contacts of %count selected activity as they are invalid for this task action.{/ts}
41 </p></div>
42 {/if}
43
44 <table class="form-layout-compressed">
45 <tr class="crm-contactProvider-form-block-Provider">
46 <td class="label">{$form.sms_provider_id.label}</td>
47 <td>{$form.sms_provider_id.html} {help id ="id-provider" file="CRM/Contact/Form/Task/SMS.hlp"}</td>
48 </tr>
49 <tr class="crm-contactsms-form-block-recipient">
50 <td class="label">{if $single eq false}{ts}Recipient(s){/ts}{else}{$form.to.label}{/if}</td>
51 <td>{$form.to.html}
52 <div class="spacer"></div>
53 </td>
54 </tr>
55 <tr><td class="label">{$form.activity_subject.label}</td>
56 <td class="value">{$form.activity_subject.html}</td>
57 </tr>
58
59
60 {if $SMSTask}
61 <tr class="crm-contactPhone-form-block-template">
62 <td class="label">{$form.template.label}</td>
63 <td>{$form.template.html}</td>
64 </tr>
65 {/if}
66
67 </table>
68 {include file="CRM/Contact/Form/Task/SMSCommon.tpl"}
69 {include file="CRM/Mailing/Form/InsertTokens.tpl"}
70
71 <div class="spacer"> </div>
72
73 {if $single eq false}
74 {include file="CRM/Contact/Form/Task.tpl"}
75 {/if}
76 {if $suppressedSms > 0}
77 {ts count=$suppressedSms plural='SMS will NOT be sent to %count contacts.'}SMS will NOT be sent to %count contact.{/ts}
78 {/if}
79
80 {if $invalidActivity > 0}
81 {ts count=$invalidActivity plural='SMS will NOT be sent to contacts of %count selected activities as they are invalid for this task action.'}SMS will NOT be sent to contacts of %count selected activity as they are invalid for this task action.{/ts}
82 {/if}
83
84 {if $extendTargetContacts > 0}
85 {ts count=$extendTargetContacts plural='SMS will NOT be sent to contacts of %count selected activities.'}SMS will NOT be sent to contacts of %count selected activity.{/ts}
86 {/if}
87 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
88 </div>
89 <script type="text/javascript">
90
91 {if $toContact}
92 toContact = {$toContact};
93 {/if}
94
95 {literal}
96 CRM.$(function($){
97 var sourceDataUrl = "{/literal}{crmURL p='civicrm/ajax/checkphone' h=0 }{literal}";
98 function phoneSelect(el){
99 $(el).data('api-entity', 'contact').crmSelect2({
100 minimumInputLength: 1,
101 multiple: true,
102 ajax: {
103 url: sourceDataUrl,
104 data: function(term) {
105 return { name: term,};
106 },
107 results: function(response) {
108 return { results: response };
109 }
110 }
111 }).select2('data', toContact);
112 }
113 phoneSelect('#to');
114 });
115 </script>
116 {/literal}