CRM-16211 fix - 'Activity Subject' not filled in when creating PDF letters from template
[civicrm-core.git] / templates / CRM / Mailing / Form / InsertTokens.tpl
index e6d00f6d5b2b3cf82f930d3eae87dee52608f598..57dc5c8122c901cc18b9940ba497512eaa72eafc 100644 (file)
@@ -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;