Move div pair into OnBehalfOf.tpl with condition on front-end
authorGuanhuan Chen <oooomic@gmail.com>
Thu, 26 Nov 2015 13:23:29 +0000 (13:23 +0000)
committerGuanhuan Chen <oooomic@gmail.com>
Thu, 26 Nov 2015 13:23:29 +0000 (13:23 +0000)
templates/CRM/Contribute/Form/Contribution/Main.tpl
templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl

index ac3fe8804f1813ab797413ecae22a5430afa98f8..6ce70a689892351f869e26ece83a29d0b9a76e8d 100644 (file)
@@ -25,9 +25,7 @@
 *}
 {* 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"}
index 1f44085988d471d0c2fde4ac141abd9ef5cc70bc..8b5eee6d358f62a729481c9b062779311746ee47 100644 (file)
@@ -31,6 +31,9 @@
  *}
 
 {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}