From: Mathieu Lutfy Date: Wed, 11 Jan 2017 21:29:26 +0000 (-0500) Subject: CRM-19860: Event participant batch update: respect "options per line" setting for... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b8a6b00eaae2b30ac2e97af7117b14adfe33c88d;p=civicrm-core.git CRM-19860: Event participant batch update: respect "options per line" setting for radio buttons --- diff --git a/templates/CRM/Event/Form/Task/Batch.tpl b/templates/CRM/Event/Form/Task/Batch.tpl index 5e1e6df9f9..883c7af87b 100644 --- a/templates/CRM/Event/Form/Task/Batch.tpl +++ b/templates/CRM/Event/Form/Task/Batch.tpl @@ -73,8 +73,36 @@ {$details.$pid.title} {foreach from=$fields item=field key=fieldName} {assign var=n value=$field.name} - {if ( $n eq 'participant_register_date' ) } - {include file="CRM/common/jcalendar.tpl" elementName=$n elementIndex=$pid batchUpdate=1} + + {* CRM-19860 Copied from templates/CRM/Contact/Form/Task/Batch.tpl *} + {if $field.options_per_line} + + {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=optionOuter key=optionKey item=optionItem from=$form.field.$pid.$n} + {if $index < 10} + {assign var="index" value=`$index+1`} + {else} + + {if $count == $field.options_per_line} + + + {assign var="count" value="1"} + {else} + {assign var="count" value=`$count+1`} + {/if} + {/if} + {/foreach} + +
{$form.field.$pid.$n.$optionKey.html}
+ {/strip} + + {elseif ( $n eq 'participant_register_date' ) } + {include file="CRM/common/jcalendar.tpl" elementName=$n elementIndex=$pid batchUpdate=1} {else} {$form.field.$pid.$n.html} {/if}