additional changes
authordeb.monish <monish.deb@webaccessglobal.com>
Mon, 3 Oct 2016 11:37:29 +0000 (17:07 +0530)
committerdeb.monish <monish.deb@webaccessglobal.com>
Mon, 3 Oct 2016 11:37:29 +0000 (17:07 +0530)
CRM/Contribute/Form/ContributionBase.php
templates/CRM/UF/Form/Block.tpl

index b0fa99acdfe8db4ad75cab4cbc10debddc103075..0544744211e9d70c036f06892a967e7cc52a94fa 100644 (file)
@@ -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);
         }
 
index 7e7b525e2373d3d38302a226d3bb251ef98965c2..76b85ac64c64ce9edbfd5bf5370d82a0ad1cb13f 100644 (file)
                   {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}