From e8d56359fb3dcda987db37de2c94866c258e7fa4 Mon Sep 17 00:00:00 2001 From: monishdeb Date: Tue, 4 Nov 2014 13:54:32 +0530 Subject: [PATCH] Additional fixes --- CRM/Contribute/Form/Contribution/Confirm.php | 2 +- templates/CRM/UF/Form/Block.tpl | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CRM/Contribute/Form/Contribution/Confirm.php b/CRM/Contribute/Form/Contribution/Confirm.php index 6191c4ebd1..3a04db6af6 100644 --- a/CRM/Contribute/Form/Contribution/Confirm.php +++ b/CRM/Contribute/Form/Contribution/Confirm.php @@ -586,7 +586,7 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr // Recursively set defaults for nested fields if (isset($contact[$name]) && is_array($contact[$name]) && ($name == 'onbehalf' || $name == 'honor')) { foreach ($contact[$name] as $fieldName => $fieldValue) { - if (is_array($fieldValue)) { + if (is_array($fieldValue) && !in_array($this->_fields[$name][$fieldName]['html_type'], array('Multi-Select','AdvMulti-Select'))) { foreach ($fieldValue as $key => $value) { $defaults["{$name}[{$fieldName}][{$key}]"] = $value; } diff --git a/templates/CRM/UF/Form/Block.tpl b/templates/CRM/UF/Form/Block.tpl index e49f3c2577..df4489e9c5 100644 --- a/templates/CRM/UF/Form/Block.tpl +++ b/templates/CRM/UF/Form/Block.tpl @@ -72,7 +72,7 @@ {/if} {if $field.options_per_line != 0}
-
{$form.$n.label}
+
{if $prefix}{$form.$prefix.$n.label}{else}{$form.$n.label}{/if}
{assign var="count" value="1"} {strip} @@ -80,11 +80,16 @@ {* sort by fails for option per line. Added a variable to iterate through the element array*} {assign var="index" value="1"} - {foreach name=outer key=key item=item from=$form.$n} + {if $prefix} + {assign var="formElement" value=$form.$prefix.$n} + {else} + {assign var="formElement" value=$form.$n} + {/if} + {foreach name=outer key=key item=item from=$formElement} {if $index < 10} {assign var="index" value=`$index+1`} {else} - {$form.$n.$key.html} + {$formElement.$key.html} {if $count == $field.options_per_line} @@ -178,4 +183,4 @@ $('#selector tr:odd ').addClass('even-row'); }); -{/literal} +{/literal}{debug} -- 2.25.1