From 3ccff713dafa9d2d215f88bdb8838c54d41f33d0 Mon Sep 17 00:00:00 2001 From: Jamie McClelland Date: Fri, 27 Jun 2014 12:46:06 -0400 Subject: [PATCH] CRM-14925 - count up the characters in use, not down from the max ---------------------------------------- * CRM-14925: SMS interface should count the characters entered, not count down https://issues.civicrm.org/jira/browse/CRM-14925 --- templates/CRM/Contact/Form/Task/SMSCommon.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/CRM/Contact/Form/Task/SMSCommon.tpl b/templates/CRM/Contact/Form/Task/SMSCommon.tpl index e6c94818fe..8f2e1c78e7 100644 --- a/templates/CRM/Contact/Form/Task/SMSCommon.tpl +++ b/templates/CRM/Contact/Form/Task/SMSCommon.tpl @@ -84,13 +84,13 @@ return true; function maxCharInfoDisplay(){ var maxLength = {/literal}{$max_sms_length}{literal}; var enteredCharLength = cj('#text_message').val().length; - var count = maxLength - enteredCharLength; + var count = enteredCharLength; if( count < 0 ) { cj('#text_message').val(cj('#text_message').val().substring(0, maxLength)); count = 0; } - cj('#char-count-message').text( "You can insert upto " + count + " characters" ); + cj('#char-count-message').text( "You can insert up to " + maxLength + " characters. You have entered " + count + " characters." ); } {/literal}{/if}{literal} -- 2.25.1