| 1 | {* |
| 2 | +--------------------------------------------------------------------+ |
| 3 | | CiviCRM version 4.7 | |
| 4 | +--------------------------------------------------------------------+ |
| 5 | | Copyright CiviCRM LLC (c) 2004-2015 | |
| 6 | +--------------------------------------------------------------------+ |
| 7 | | This file is a part of CiviCRM. | |
| 8 | | | |
| 9 | | CiviCRM is free software; you can copy, modify, and distribute it | |
| 10 | | under the terms of the GNU Affero General Public License | |
| 11 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | |
| 12 | | | |
| 13 | | CiviCRM is distributed in the hope that it will be useful, but | |
| 14 | | WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 16 | | See the GNU Affero General Public License for more details. | |
| 17 | | | |
| 18 | | You should have received a copy of the GNU Affero General Public | |
| 19 | | License and the CiviCRM Licensing Exception along | |
| 20 | | with this program; if not, contact CiviCRM LLC | |
| 21 | | at info[AT]civicrm[DOT]org. If you have questions about the | |
| 22 | | GNU Affero General Public License or the licensing of CiviCRM, | |
| 23 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | |
| 24 | +--------------------------------------------------------------------+ |
| 25 | *} |
| 26 | <div class="crm-block crm-form-block crm-member-task-batch-form-block"> |
| 27 | <div id="help"> |
| 28 | {ts}Update field values for each member as needed. Click <strong>Update Memberships</strong> below to save all your changes. To set a field to the same value for ALL rows, enter that value for the first member and then click the <strong>Copy icon</strong> (next to the column title).{/ts} |
| 29 | </div> |
| 30 | <div class="crm-submit-buttons"> |
| 31 | {if $fields}{$form._qf_Batch_refresh.html}{/if} {include file="CRM/common/formButtons.tpl" location="top"} |
| 32 | </div> |
| 33 | <table class="crm-copy-fields"> |
| 34 | <thead class="sticky"> |
| 35 | <tr class="columnheader"> |
| 36 | {foreach from=$readOnlyFields item=fTitle key=fName} |
| 37 | <th>{$fTitle}</th> |
| 38 | {/foreach} |
| 39 | |
| 40 | {foreach from=$fields item=field key=fieldName} |
| 41 | <td><img src="{$config->resourceBase}i/copy.png" alt="{ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts}" fname="{$field.name}" class="action-icon" title="{ts}Click here to copy the value in row one to ALL rows.{/ts}" />{$field.title}</td> |
| 42 | {/foreach} |
| 43 | </tr> |
| 44 | </thead> |
| 45 | {foreach from=$componentIds item=mid} |
| 46 | <tr class="{cycle values="odd-row,even-row"}" entity_id="{$mid}"> |
| 47 | |
| 48 | {foreach from=$readOnlyFields item=fTitle key=fName} |
| 49 | <td>{$contactDetails.$mid.$fName}</td> |
| 50 | {/foreach} |
| 51 | |
| 52 | {foreach from=$fields item=field key=fieldName} |
| 53 | {assign var=n value=$field.name} |
| 54 | {if ( $fields.$n.data_type eq 'Date') or ($n eq 'join_date') or ($n eq 'membership_start_date') or ($n eq 'membership_end_date')} |
| 55 | <td class="compressed">{include file="CRM/common/jcalendar.tpl" elementName=$n elementIndex=$mid batchUpdate=1}</td> |
| 56 | {else} |
| 57 | <td class="compressed">{$form.field.$mid.$n.html}</td> |
| 58 | {/if} |
| 59 | {/foreach} |
| 60 | </tr> |
| 61 | {/foreach} |
| 62 | </tr> |
| 63 | </table> |
| 64 | <div class="crm-submit-buttons"> |
| 65 | {if $fields}{$form._qf_Batch_refresh.html}{/if} {include file="CRM/common/formButtons.tpl" location="bottom"} |
| 66 | </div> |
| 67 | </div> |
| 68 | |
| 69 | {*include batch copy js js file*} |
| 70 | {include file="CRM/common/batchCopy.tpl"} |