From 3266bf6803582ee5ce6be3f77c56af00fd5d8f24 Mon Sep 17 00:00:00 2001 From: yashodha Date: Wed, 4 Sep 2019 09:02:40 +0530 Subject: [PATCH] (dev/core#1065) Grant in Edit mode doesn't show the associated contact --- CRM/Grant/Form/Grant.php | 5 +++-- templates/CRM/Grant/Form/Grant.tpl | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CRM/Grant/Form/Grant.php b/CRM/Grant/Form/Grant.php index 36d7afa24f..d03961fb02 100644 --- a/CRM/Grant/Form/Grant.php +++ b/CRM/Grant/Form/Grant.php @@ -224,8 +224,9 @@ class CRM_Grant_Form_Grant extends CRM_Core_Form { ], ]); - if ($this->_context == 'standalone') { - $this->addEntityRef('contact_id', ts('Applicant'), ['create' => TRUE], TRUE); + $contactField = $this->addEntityRef('contact_id', ts('Applicant'), ['create' => TRUE], TRUE); + if ($this->_context != 'standalone') { + $contactField->freeze(); } } diff --git a/templates/CRM/Grant/Form/Grant.tpl b/templates/CRM/Grant/Form/Grant.tpl index a3385f6929..6deac7d975 100644 --- a/templates/CRM/Grant/Form/Grant.tpl +++ b/templates/CRM/Grant/Form/Grant.tpl @@ -35,12 +35,10 @@ {else}
{include file="CRM/common/formButtons.tpl" location="top"}
- {if $context eq 'standalone'} - {/if} -- 2.25.1
{$form.contact_id.label} {$form.contact_id.html}
{$form.status_id.label} {$form.status_id.html}