Convert activity form to standard customData template
authorMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Mon, 7 Jan 2019 17:53:14 +0000 (17:53 +0000)
committerMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Mon, 7 Jan 2019 22:11:51 +0000 (22:11 +0000)
templates/CRM/Activity/Form/Activity.tpl

index ebf945ceaff9ef978aa095dfa132c2add12a6c8b..fd2f4a3c75ddc623625de4d62b14cbc36d675fc5 100644 (file)
 
 
   {if $action eq 1 or $action eq 2 or $context eq 'search' or $context eq 'smog'}
-    {*include custom data js file*}
-    {include file="CRM/common/customData.tpl"}
     {literal}
     <script type="text/javascript">
-    CRM.$(function($) {
-      var doNotNotifyAssigneeFor = {/literal}{$doNotNotifyAssigneeFor|@json_encode}{literal};
-      $('#activity_type_id').change(function() {
-        if ($.inArray($(this).val(), doNotNotifyAssigneeFor) != -1) {
-          $('#notify_assignee_msg').hide();
-        }
-        else {
-          $('#notify_assignee_msg').show();
-        }
+      CRM.$(function($) {
+        var doNotNotifyAssigneeFor = {/literal}{$doNotNotifyAssigneeFor|@json_encode}{literal};
+        $('#activity_type_id').change(function() {
+          if ($.inArray($(this).val(), doNotNotifyAssigneeFor) != -1) {
+            $('#notify_assignee_msg').hide();
+          }
+          else {
+            $('#notify_assignee_msg').show();
+          }
+        });
       });
-
-      {/literal}
-      {if $customDataSubType}
-        CRM.buildCustomData( '{$customDataType}', {$customDataSubType} );
-        {else}
-        CRM.buildCustomData( '{$customDataType}' );
-      {/if}
-      {literal}
-    });
     </script>
     {/literal}
+
+    {include file="CRM/common/customDataBlock.tpl"}
   {/if}
   </div>{* end of form block*}