// assign contribution page id to the template so we can add css class for it
$this->assign('contributionPageID', $this->_id);
+ $this->assign('is_for_organization', CRM_Utils_Array::value('is_for_organization', $this->_params));
$this->set('params', $this->_params);
}
// If onbehalf-of-organization contribution / signup, add organization
// and it's location.
- if (isset($this->_values['onbehalf_profile_id']) && isset($behalfOrganization['organization_name'])) {
+ if (isset($this->_values['onbehalf_profile_id']) && isset($behalfOrganization['organization_name']) && !empty($this->_params['is_for_organization'])) {
$ufFields = array();
foreach ($this->_fields['onbehalf'] as $name => $value) {
$ufFields[$name] = 1;
if ($this->_params['is_pay_later']) {
$this->assign('pay_later_receipt', $this->_values['pay_later_receipt']);
}
+ $this->assign('is_for_organization', CRM_Utils_Array::value('is_for_organization', $this->_params));
}
/**
{/if}
- {if $onbehalfProfile|@count}
+ {if $onbehalfProfile|@count && $is_for_organization}
<div class="crm-group onBehalf_display-group label-left crm-profile-view">
{include file="CRM/UF/Form/Block.tpl" fields=$onbehalfProfile prefix='onbehalf'}
</div>
</div>
{/if}
- {if $onbehalfProfile|@count}
+ {if $onbehalfProfile|@count && $is_for_organization}
<div class="crm-group onBehalf_display-group label-left crm-profile-view">
{include file="CRM/UF/Form/Block.tpl" fields=$onbehalfProfile prefix='onbehalf'}
</div>