{* +--------------------------------------------------------------------+ | CiviCRM version 5 | +--------------------------------------------------------------------+ | Copyright CiviCRM LLC (c) 2004-2019 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | | CiviCRM is free software; you can copy, modify, and distribute it | | under the terms of the GNU Affero General Public License | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | | | CiviCRM is distributed in the hope that it will be useful, but | | WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | See the GNU Affero General Public License for more details. | | | | You should have received a copy of the GNU Affero General Public | | License and the CiviCRM Licensing Exception along | | with this program; if not, contact CiviCRM LLC | | at info[AT]civicrm[DOT]org. If you have questions about the | | GNU Affero General Public License or the licensing of CiviCRM, | | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ *}
{ts}Update field values for each contact as needed. Click Update Contacts below to save all your changes. To set a field to the same value for ALL rows, enter that value for the first contact and then click the Copy icon (next to the column title).{/ts}
{foreach from=$fields item=field key=fieldName} {if $field.skipDisplay} {continue} {/if} {/foreach} {foreach from=$componentIds item=cid} {foreach from=$fields item=field key=fieldName} {if $field.skipDisplay} {continue} {/if} {assign var=n value=$field.name} {if $field.options_per_line} {elseif $n|substr:0:5 eq 'phone'} {else} {/if} {/foreach} {/foreach}
{ts}Name{/ts}{ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts}{$field.title}
{$sortName.$cid} {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.$cid.$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.$cid.$n.$optionKey.html}
{/strip}
{assign var="phone_ext_field" value=$n|replace:'phone':'phone_ext'} {$form.field.$cid.$n.html} {if $form.field.$cid.$phone_ext_field.html}  {$form.field.$cid.$phone_ext_field.html} {/if} {$form.field.$cid.$n.html}
{if $fields}{$form._qf_BatchUpdateProfile_refresh.html}{/if}  
{$form.buttons.html}
{*include batch copy js js file*} {include file="CRM/common/batchCopy.tpl"}