From: deb.monish Date: Mon, 3 Oct 2016 11:37:29 +0000 (+0530) Subject: additional changes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6d43e496aa938a46e5b09df9f915a58c54a003ca;p=civicrm-core.git additional changes --- diff --git a/CRM/Contribute/Form/ContributionBase.php b/CRM/Contribute/Form/ContributionBase.php index b0fa99acdf..0544744211 100644 --- a/CRM/Contribute/Form/ContributionBase.php +++ b/CRM/Contribute/Form/ContributionBase.php @@ -702,7 +702,10 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form { $this->assign($name, $fields); - if (count($viewOnlyFileValues)) { + if ($profileContactType && count($viewOnlyFileValues[$profileContactType])) { + $this->assign('viewOnlyPrefixFileValues', $viewOnlyFileValues); + } + elseif (count($viewOnlyFileValues)) { $this->assign('viewOnlyFileValues', $viewOnlyFileValues); } diff --git a/templates/CRM/UF/Form/Block.tpl b/templates/CRM/UF/Form/Block.tpl index 7e7b525e23..76b85ac64c 100644 --- a/templates/CRM/UF/Form/Block.tpl +++ b/templates/CRM/UF/Form/Block.tpl @@ -135,8 +135,8 @@ {if $n eq 'organization_name' && !empty($form.onbehalfof_id)} {$form.onbehalfof_id.html} {/if} - {if $field.html_type eq 'File' && $viewOnlyFileValues.$prefix} - {$viewOnlyFileValues.$prefix.$n} + {if $field.html_type eq 'File' && $viewOnlyPrefixFileValues} + {$viewOnlyPrefixFileValues.$prefix.$n} {else} {$form.$prefix.$n.html} {/if}