}
}
}
+ else {
+ if ($this->_contactID) {
+ $defaults['contact_id'] = $this->_contactID;
+ }
+ }
//set Soft Credit Type to Gift by default
$scTypes = CRM_Core_OptionGroup::values("soft_credit_type");
return;
}
- if ($this->_context == 'standalone') {
- $this->addEntityRef('contact_id', ts('Contact'), [
- 'create' => TRUE,
- 'api' => ['extra' => ['email']],
- ], TRUE);
+ $contactField = $this->addEntityRef('contact_id', ts('Contact'), ['create' => TRUE, 'api' => ['extra' => ['email']]], TRUE);
+ if ($this->_context != 'standalone') {
+ $contactField->freeze();
}
$selOrgMemType[0][0] = $selMemTypeOrg[0] = ts('- select -');
</div>
{else}
<table class="form-layout-compressed">
- {if $context neq 'standalone'}
- <tr>
- <td class="font-size12pt label"><strong>{ts}Member{/ts}</strong></td><td class="font-size12pt"><strong>{$displayName}</strong></td>
- </tr>
- {else}
- <td class="label">{$form.contact_id.label}</td>
- <td>{$form.contact_id.html}</td>
- {/if}
+ <tr class="crm-membership-form-contact-id">
+ <td class="label">{$form.contact_id.label}</td>
+ <td>{$form.contact_id.html}</td>
+ </tr>
<tr class="crm-membership-form-block-membership_type_id">
<td class="label">{$form.membership_type_id.label}</td>
<td><span id='mem_type_id'>{$form.membership_type_id.html}</span>