2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.4 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2013 |
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 {ts}Plain-Text Format{/ts}
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="text_message" />
36 {help id="id-token-text" tplFile=$tplFile file="CRM/Contact/Form/Task/SMS.hlp"}
39 {$form.text_message.html}<br />
41 </div><!-- /.crm-accordion-body -->
42 </div><!-- /.crm-accordion-wrapper -->
43 <div id="editMessageDetails" class="section">
44 <div id="updateDetails" class="section" >
45 {$form.updateTemplate.html} {$form.updateTemplate.label}
48 {$form.saveTemplate.html} {$form.saveTemplate.label}
52 <div id="saveDetails" class="section">
53 <div class="label">{$form.saveTemplateName.label}</div>
54 <div class="content">{$form.saveTemplateName.html|crmAddClass:huge}</div>
57 {include file="CRM/Mailing/Form/InsertTokens.tpl"}
59 <script type="text/javascript">
64 {/literal}{if $max_sms_length}{literal}
67 cj('#text_message').bind({
76 function maxLengthMessage()
78 var len = cj('#text_message').val().length;
79 var maxLength = {/literal}{$max_sms_length}{literal};
80 if (len > maxLength) {
81 cj('#text_message').crmError({/literal}'{ts escape="js"}SMS body exceeding limit of 160 characters{/ts}'{literal});
87 function maxCharInfoDisplay(){
88 var maxLength = {/literal}{$max_sms_length}{literal};
89 var enteredCharLength = cj('#text_message').val().length;
90 var count = maxLength - enteredCharLength;
93 cj('#text_message').val(cj('#text_message').val().substring(0, maxLength));
96 cj('#char-count-message').text( "You can insert upto " + count + " characters" );
98 {/literal}{/if}{literal}