CRM-16450 Custom data tab - fix indentation on tpl
authorEileen McNaughton <eileen@fuzion.co.nz>
Mon, 4 May 2015 00:31:00 +0000 (12:31 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Sun, 17 May 2015 22:47:01 +0000 (10:47 +1200)
This is separate to the previous commit for readability

templates/CRM/Contact/Page/View/CustomData.tpl

index 89b730389a1ecce6096ebae0394a9c9ec5e372f2..6cd6b78bb5f516742660a2f9e34715ed8d6e3b05 100644 (file)
 {* template for custom data *}
 {assign var="customDataGroupName" value=$customDataGroup.name}
 {foreach from=$viewCustomData item=customGroupWrapper}
-{foreach from=$customGroupWrapper item=customGroup key=customGroupId}
-{assign var="customRegion" value='contact-custom-data-'|cat:$customGroup.name}
-{crmRegion name=$customRegion}
-{if $customGroup.help_pre}
-  <div class="messages help">{$customGroup.help_pre}</div>
-{/if}
-{if $action eq 0 or $action eq 1 or $action eq 2 or $recordActivity}
-  {include file="CRM/Contact/Form/CustomData.tpl" mainEdit=$mainEditForm}
-{/if}
-{if $displayStyle eq 'tableOriented'}
-  {include file='CRM/Profile/Page/MultipleRecordFieldsListing.tpl' showListing=1 dontShowTitle=1 pageViewType='customDataView'}
-  {literal}
-  <script type="text/javascript">
-    CRM.$(function($) {
-      var $table = $("#{/literal}custom-{$customGroupId}-table-wrapper{literal}");
-      $('a.delete-custom-row', $table).on('click', function(e) {
-        var $el = $(this);
-        CRM.confirm({
-          message: '{/literal}{ts escape='js'}Are you sure you want to delete this record?{/ts}{literal}'
-        }).on('crmConfirm:yes', function() {
-          var postUrl = {/literal}"{crmURL p='civicrm/ajax/customvalue' h=0 }"{literal};
-          var request = $.post(postUrl, $el.data('delete_params'));
-          CRM.status({/literal}"{ts escape='js'}Record Deleted{/ts}"{literal}, request);
-          request.done(function() {
-            CRM.refreshParent($el);
-          });
-        })
-        e.preventDefault();
-      });
-    });
-  </script>
-  {/literal}
-{else}
-{strip}
-  {if $action eq 16 or $action eq 4} {* Browse or View actions *}
-    <div class="form-item">
-      {include file="CRM/Custom/Page/CustomDataView.tpl"}
-    </div>
-  {/if}
-{/strip}
+  {foreach from=$customGroupWrapper item=customGroup key=customGroupId}
+    {assign var="customRegion" value='contact-custom-data-'|cat:$customGroup.name}
+    {crmRegion name=$customRegion}
+      {if $customGroup.help_pre}
+        <div class="messages help">{$customGroup.help_pre}</div>
+      {/if}
+      {if $action eq 0 or $action eq 1 or $action eq 2 or $recordActivity}
+        {include file="CRM/Contact/Form/CustomData.tpl" mainEdit=$mainEditForm}
+      {/if}
+      {if $displayStyle eq 'tableOriented'}
+        {include file='CRM/Profile/Page/MultipleRecordFieldsListing.tpl' showListing=1 dontShowTitle=1 pageViewType='customDataView'}
+        {literal}
+          <script type="text/javascript">
+            CRM.$(function($) {
+              var $table = $("#{/literal}custom-{$customGroupId}-table-wrapper{literal}");
+              $('a.delete-custom-row', $table).on('click', function(e) {
+                var $el = $(this);
+                CRM.confirm({
+                  message: '{/literal}{ts escape='js'}Are you sure you want to delete this record?{/ts}{literal}'
+                }).on('crmConfirm:yes', function() {
+                  var postUrl = {/literal}"{crmURL p='civicrm/ajax/customvalue' h=0 }"{literal};
+                  var request = $.post(postUrl, $el.data('delete_params'));
+                  CRM.status({/literal}"{ts escape='js'}Record Deleted{/ts}"{literal}, request);
+                  request.done(function() {
+                    CRM.refreshParent($el);
+                  });
+                })
+                e.preventDefault();
+              });
+            });
+          </script>
+        {/literal}
+      {else}
+        {strip}
+          {if $action eq 16 or $action eq 4} {* Browse or View actions *}
+            <div class="form-item">
+              {include file="CRM/Custom/Page/CustomDataView.tpl"}
+            </div>
+          {/if}
+        {/strip}
 
-{if $mainEditForm}
-  <script type="text/javascript">
-    var showBlocks1 = new Array({$showBlocks1});
-    var hideBlocks1 = new Array({$hideBlocks1});
+        {if $mainEditForm}
+          <script type="text/javascript">
+            var showBlocks1 = new Array({$showBlocks1});
+            var hideBlocks1 = new Array({$hideBlocks1});
 
-    on_load_init_blocks(showBlocks1, hideBlocks1);
-  </script>
-{else}
-  <script type="text/javascript">
-    var showBlocks = new Array({$showBlocks});
-    var hideBlocks = new Array({$hideBlocks});
+            on_load_init_blocks(showBlocks1, hideBlocks1);
+          </script>
+        {else}
+          <script type="text/javascript">
+            var showBlocks = new Array({$showBlocks});
+            var hideBlocks = new Array({$hideBlocks});
 
-    {* hide and display the appropriate blocks as directed by the php code *}
-    on_load_init_blocks(showBlocks, hideBlocks);
-  </script>
-{/if}
-{/if}
-{if $customGroup.help_post}
-  <div class="messages help">{$customGroup.help_post}</div>
-{/if}
-{/crmRegion}
-{/foreach}
+            {* hide and display the appropriate blocks as directed by the php code *}
+            on_load_init_blocks(showBlocks, hideBlocks);
+          </script>
+        {/if}
+      {/if}
+      {if $customGroup.help_post}
+        <div class="messages help">{$customGroup.help_post}</div>
+      {/if}
+    {/crmRegion}
+  {/foreach}
 {/foreach}