*}
{* Callback snippet: On-behalf profile *}
{if $snippet and !empty($isOnBehalfCallback)}
-<div class="crm-public-form-item crm-section">
- {include file="CRM/Contribute/Form/Contribution/OnBehalfOf.tpl" context="front-end"}
-</div>
+{include file="CRM/Contribute/Form/Contribution/OnBehalfOf.tpl" context="front-end"}
{* Callback snippet: Load payment processor *}
{elseif $snippet}
{include file="CRM/Core/BillingBlock.tpl"}
*}
{if $buildOnBehalfForm or $onBehalfRequired}
+{if $context eq 'front-end'}
+<div class="crm-public-form-item crm-section">
+{/if}
<fieldset id="for_organization" class="for_organization-group">
<legend>{$fieldSetTitle}</legend>
{if ( $relatedOrganizationFound or $onBehalfRequired ) and !$organizationName}
</div>
<div>{$form.mode.html}</div>
</fieldset>
+{if $context eq 'front-end'}
+</div>
+{/if}
{/if}
{if empty($snippet)}
{literal}