Skip to content

Commit

Permalink
Merge pull request #12122 from eileenmcnaughton/cudat
Browse files Browse the repository at this point in the history
tpl extraction of shared code for customDataBlock
  • Loading branch information
eileenmcnaughton authored May 14, 2018
2 parents 6e74fca + 67bb649 commit f8f98c9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
16 changes: 1 addition & 15 deletions templates/CRM/Member/Form/Membership.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -206,21 +206,7 @@
{$form.receipt_text.html|crmAddClass:huge}</td>
</tr>
</table>
<div id="customData"></div>
{*include custom data js file*}
{include file="CRM/common/customData.tpl"}
{literal}
<script type="text/javascript">
CRM.$(function($) {
{/literal}
CRM.buildCustomData( '{$customDataType}' );
{if $customDataSubType}
CRM.buildCustomData( '{$customDataType}', {$customDataSubType} );
{/if}
{literal}
});
</script>
{/literal}
{include file="CRM/common/customDataBlock.tpl"}
{if $accessContribution and $action eq 2 and $rows.0.contribution_id}
<div class="crm-accordion-wrapper">
<div class="crm-accordion-header">{ts}Related Contributions{/ts}</div>
Expand Down
17 changes: 17 additions & 0 deletions templates/CRM/common/customDataBlock.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{if $customDataType}
<div id="customData"></div>
{*include custom data js file*}
{include file="CRM/common/customData.tpl"}
{literal}
<script type="text/javascript">
CRM.$(function($) {
{/literal}
CRM.buildCustomData( '{$customDataType}' );
{if $customDataSubType}
CRM.buildCustomData( '{$customDataType}', {$customDataSubType} );
{/if}
{literal}
});
</script>
{/literal}
{/if}

0 comments on commit f8f98c9

Please sign in to comment.