additional fixes
authordeb.monish <monish.deb@webaccessglobal.com>
Wed, 13 Jul 2016 08:23:10 +0000 (13:53 +0530)
committerdeb.monish <monish.deb@webaccessglobal.com>
Thu, 14 Jul 2016 18:05:43 +0000 (23:35 +0530)
CRM/Admin/Form/MessageTemplates.php
templates/CRM/Admin/Form/MessageTemplates.tpl
templates/CRM/Contact/Form/Task/PDFLetterCommon.tpl

index 56f9bfd55de20f58afc12f54e2921a49dd5deeaa..36d845bf99b815380e14263c7d2f50fc8e089115 100644 (file)
@@ -170,7 +170,10 @@ class CRM_Admin_Form_MessageTemplates extends CRM_Admin_Form {
     $this->add('text', 'msg_title', ts('Message Title'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_MessageTemplate', 'msg_title'), TRUE);
 
     $options = array(ts('Compose On-screen'), ts('Upload Document'));
-    $this->addRadio('file_type', ts('Source'), $options);
+    $element = $this->addRadio('file_type', ts('Source'), $options);
+    if ($this->_id) {
+      $element->freeze();
+    }
 
     $this->addElement('file', "file_id", ts('Upload Document'), 'size=30 maxlength=60');
     $this->addUploadElement("file_id");
index ce3d019c563bb81145dc373f7a843754db6bb728..f6637db177162521cbf62d2bcb29683850ee860f 100644 (file)
         mimeType = $('a.delete-attachment').data('mimetype');
       }
 
-      showHideUpload($("input[id$='_file_type']:checked").val());
+      showHideUpload($("input[id$='_file_type']").val());
       $("input[id$='_file_type']").on('click', function(){
         showHideUpload(this.value);
       });
index 47eba656866ea59fd3792b333c6be92896e6ce61..ec4e1ef00b6e951938c72e80f841785c4b89c9c1 100644 (file)
@@ -150,7 +150,8 @@ CRM.$(function($) {
     $('.crm-document-accordion').hide();
     $('#document_file').on('change', function() {
       if (this.value) {
-        $('.crm-html_email-accordion, .crm-document-accordion').toggle(false);
+        $('.crm-html_email-accordion, .crm-document-accordion').hide();
+        cj('#document_type').closest('tr').hide();
         $('#template').val('');
       }
     });