2 +--------------------------------------------------------------------+
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2018 |
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 {*common template for compose sms*}
28 <div class="crm-accordion-wrapper crm-plaint_text_sms-accordion ">
29 <div class="crm-accordion-header">
30 {$form.sms_text_message.label}
31 </div><!-- /.crm-accordion-header -->
32 <div class="crm-accordion-body">
33 <div id='char-count-message'></div>
34 <div class="helpIcon" id="helptext">
35 <input class="crm-token-selector big" data-field="sms_text_message" />
36 {help id="id-token-text" tplFile=$tplFile file="CRM/Contact/Form/Task/SMS.hlp"}
39 {$form.sms_text_message.html}<br />
41 </div><!-- /.crm-accordion-body -->
42 </div><!-- /.crm-accordion-wrapper -->
43 <div id="SMSeditMessageDetails" class="section">
44 <div id="SMSupdateDetails" class="section" >
45 {$form.SMSupdateTemplate.html} {$form.SMSupdateTemplate.label}
48 {$form.SMSsaveTemplate.html} {$form.SMSsaveTemplate.label}
52 <div id="SMSsaveDetails" class="section">
53 <div class="label">{$form.SMSsaveTemplateName.label}</div>
54 <div class="content">{$form.SMSsaveTemplateName.html|crmAddClass:huge}</div>
58 <script type="text/javascript">
60 {/literal}{if $max_sms_length}{literal}
63 cj('#sms_text_message').bind({
72 function maxLengthMessage()
74 var len = cj('#sms_text_message').val().length;
75 var maxLength = {/literal}{$max_sms_length}{literal};
76 if (len > maxLength) {
77 cj('#sms_text_message').crmError({/literal}'{ts escape="js"}SMS body exceeding limit of 160 characters{/ts}'{literal});
83 function maxCharInfoDisplay(){
84 var maxLength = {/literal}{$max_sms_length}{literal};
85 var enteredCharLength = cj('#sms_text_message').val().length;
86 var count = enteredCharLength;
89 cj('#sms_text_message').val(cj('#sms_text_message').val().substring(0, maxLength));
92 cj('#char-count-message').text( "You can insert up to " + maxLength + " characters. You have entered " + count + " characters." );
94 {/literal}{/if}{literal}