Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-19860: Event participant batch update: respect "options per line" setting for radio buttons #9667

Merged
merged 1 commit into from
Jan 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions templates/CRM/Event/Form/Task/Batch.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,36 @@
<td class="crm-event-title">{$details.$pid.title}</td>
{foreach from=$fields item=field key=fieldName}
{assign var=n value=$field.name}
{if ( $n eq 'participant_register_date' ) }
<td class="compressed">{include file="CRM/common/jcalendar.tpl" elementName=$n elementIndex=$pid batchUpdate=1}</td>

{* CRM-19860 Copied from templates/CRM/Contact/Form/Task/Batch.tpl *}
{if $field.options_per_line}
<td class="compressed">
{assign var="count" value="1"}
{strip}
<table class="form-layout-compressed">
<tr>
{* 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}
<td class="labels font-light">{$form.field.$pid.$n.$optionKey.html}</td>
{if $count == $field.options_per_line}
</tr>
<tr>
{assign var="count" value="1"}
{else}
{assign var="count" value=`$count+1`}
{/if}
{/if}
{/foreach}
</tr>
</table>
{/strip}
</td>
{elseif ( $n eq 'participant_register_date' ) }
<td class="compressed">{include file="CRM/common/jcalendar.tpl" elementName=$n elementIndex=$pid batchUpdate=1}</td>
{else}
<td class="compressed">{$form.field.$pid.$n.html}</td>
{/if}
Expand Down