$config = CRM_Core_Config::singleton();
+ $contactID = $this->getContactID();
+ if ($contactID) {
+ $this->assign('contact_id', $contactID);
+ $this->assign('display_name', CRM_Contact_BAO_Contact::displayName($contactID));
+ }
+
if ($this->_onbehalf) {
CRM_Contribute_Form_Contribution_OnBehalfOf::buildQuickForm($this);
// Return if we are in an ajax callback
}
$contactID = $this->getContactID();
- $this->assign('contact_id', $contactID);
- $this->assign('display_name', CRM_Contact_BAO_Contact::displayName($contactID));
+ if ($contactID) {
+ $this->assign('contact_id', $contactID);
+ $this->assign('display_name', CRM_Contact_BAO_Contact::displayName($contactID));
+ }
$this->add('hidden', 'scriptFee', NULL);
$this->add('hidden', 'scriptArray', NULL);
if ($priceSetId) {
$isQuickConfig = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $priceSetId, 'is_quick_config');
if ($isQuickConfig) {
- $copyPriceSet = &CRM_Price_BAO_PriceSet::copy($priceSetId);
+ $copyPriceSet = CRM_Price_BAO_PriceSet::copy($priceSetId);
CRM_Price_BAO_PriceSet::addTo($baoName, $newId, $copyPriceSet->id);
}
else {
{capture assign='reqMark'}<span class="marker" title="{ts}This field is required.{/ts}">*</span>{/capture}
<div class="crm-contribution-page-id-{$contributionPageID} crm-block crm-contribution-main-form-block">
+
+ {if $contact_id}
+ <div class="messages status no-popup crm-not-you-message">
+ {ts 1=$display_name}Welcome %1{/ts}. (<a href="{crmURL p='civicrm/contribute/transact' q="cid=0&reset=1&id=`$contributionPageID`"}" title="{ts}Click here to do this for a different person.{/ts}">{ts 1=$display_name}Not %1, or want to do this for a different person{/ts}</a>?)
+ </div>
+ {/if}
+
<div id="intro_text" class="crm-section intro_text-section">
{$intro_text}
</div>
{/if}
{if $contact_id}
- <div class="messages status no-popup" id="crm-event-register-different">
+ <div class="messages status no-popup crm-not-you-message" id="crm-event-register-different">
{ts 1=$display_name}Welcome %1{/ts}. (<a
href="{crmURL p='civicrm/event/register' q="cid=0&reset=1&id=`$event.id`"}"
title="{ts}Click here to register a different person for this event.{/ts}">{ts 1=$display_name}Not %1, or want to register a different person{/ts}</a>?)