CRM-16211 fix - 'Activity Subject' not filled in when creating PDF letters from template
[civicrm-core.git] / templates / CRM / Mailing / Form / InsertTokens.tpl
index 8d473eddd5df32c55cce4e7d591b0844d15cf04c..57dc5c8122c901cc18b9940ba497512eaa72eafc 100644 (file)
@@ -1,8 +1,8 @@
 {*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -46,7 +46,7 @@ var isMailing    = false;
   text_message = "mailing_format";
   isMailing = false;
   {/literal}
-  {elseif $form.formClass eq 'CRM_SMS_Form_Upload'}
+  {elseif $form.formClass eq 'CRM_SMS_Form_Upload' || $form.formClass eq 'CRM_Contact_Form_Task_SMS'}
   {literal}
   prefix = "SMS";
   text_message = "sms_text_message";
@@ -167,9 +167,6 @@ function selectValue( val, prefix) {
       if (prefix == "SMS") {
           text_message = "sms_text_message";
       }
-      else {
-        cj("#subject").val( data.subject );
-      }
       if ( data.msg_text ) {
         cj("#"+text_message).val( data.msg_text );
         cj("div.text").show();
@@ -184,6 +181,9 @@ function selectValue( val, prefix) {
     if (prefix == "SMS") {
       return;
     }
+    else {
+      cj("#subject").val( data.subject );
+    }
     var html_body  = "";
     if (  data.msg_html ) {
       html_body = data.msg_html;
@@ -385,11 +385,11 @@ CRM.$(function($) {
   // Initialize token selector widgets
   var form = $('form.{/literal}{$form.formClass}{literal}');
   $('input.crm-token-selector', form)
-    .addClass('crm-action-menu')
+    .addClass('crm-action-menu action-icon-token')
     .change(insertToken)
     .crmSelect2({
       data: form.data('tokens'),
-      placeholder: '{/literal}{ts escape='js'}Insert Token{/ts}{literal}'
+      placeholder: '{/literal}{ts escape='js'}Tokens{/ts}{literal}'
     });
 
   $('.accordion .head').addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ");