From f62e40cfb92aa8339579456efabf5d2710c05893 Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Fri, 28 Jun 2013 14:47:07 -0700 Subject: [PATCH] CRM-12980 fix bug in OnBehalfOf.tpl causing checkbox and radio options not be be displayed when options_per_line is set. Indenting cleanup in that tpl as well. ---------------------------------------- * CRM-12980: Checkbox and radio button custom fields are not rendered in On Behalf Of profiles if Options Per Line is set http://issues.civicrm.org/jira/browse/CRM-12980 --- .../Form/Contribution/OnBehalfOf.tpl | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl b/templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl index a3aece0358..6760a57bf7 100644 --- a/templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl +++ b/templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl @@ -35,11 +35,11 @@
{$fieldSetTitle} {if ( $relatedOrganizationFound or $onBehalfRequired ) and !$organizationName} -
-
- {$form.org_option.html} +
+
+ {$form.org_option.html} +
-
{/if}
@@ -61,8 +61,8 @@
{$form.onbehalf.$fieldName.html|crmAddClass:big} - ( {ts}Enter a new organization{/ts} ) - + ( {ts}Enter a new organization{/ts} ) +
{ts}Organization details have been prefilled for you. If this is not the organization you want to use, click "Enter a new organization" above.{/ts}
@@ -70,26 +70,26 @@ {$onBehalfOfFields.$fieldName.help_post} {/if}
- {else} - {if $onBehalfOfFields.$fieldName.options_per_line != 0} + {else} + {if $onBehalfOfFields.$fieldName.options_per_line}
{$form.onbehalf.$fieldName.label}
-
+
{assign var="count" value="1"} {strip} {* 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=$field} + {foreach name=outer key=key item=item from=$form.onbehalf.$fieldName} {if $index < 10} {assign var="index" value=`$index+1`} - {else} + {else} {if $count == $onBehalfOfFields.$fieldName.options_per_line} - - + + {assign var="count" value="1"} - {else} + {else} {assign var="count" value=`$count+1`} {/if} {/if} @@ -101,7 +101,7 @@ {$onBehalfOfFields.$fieldName.help_post} {/if} - {else} + {else}
{$form.onbehalf.$fieldName.label}
{$form.onbehalf.$fieldName.html} -- 2.25.1
{$form.onbehalf.$fieldName.$key.html}