Update copyright date for 2020
[civicrm-core.git] / templates / CRM / Event / Form / Task / Batch.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
fee14197 3 | CiviCRM version 5 |
6a488035 4 +--------------------------------------------------------------------+
f299f7db 5 | Copyright CiviCRM LLC (c) 2004-2020 |
6a488035
TO
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="batch-update crm-block crm-form-block crm-event-batch-form-block">
f72db5fa 27 <div class="help">
6a488035 28 {if $context EQ 'statusChange'} {* Update Participant Status task *}
4a64b915 29 {ts}Update the status for each participant individually below, or change all statuses to:{/ts}
f72db5fa 30 {$form.status_change.html} {help id="id-status_change"}
1aa1efef
AH
31 {if $status}
32 <div class="status">
4a64b915
AH
33 <p>{ts}This form <strong>will send email</strong> to contacts only in certain circumstances:{/ts}</p>
34 <ul>
bdee7883 35 <li>{ts}<strong>Resolving "Pay Later" registrations for online registrations:</strong> Participants who registered online whose status is changed from <em>Pending Pay Later</em> to <em>Registered</em> or <em>Attended</em> will receive a confirmation email and their payment status will be set to completed. If this is not you want to do, you can change their participant status by editing their event registration record directly.{/ts}</li>
1aa1efef 36 {if $notifyingStatuses}
4a64b915 37 <li>{ts 1=$notifyingStatuses}<strong>Special statuses:</strong> Participants whose status is changed to any of the following will be automatically notified via email: %1{/ts}</li>
1aa1efef 38 {/if}
4a64b915 39 </ul>
1aa1efef
AH
40 </div>
41 {/if}
6a488035 42 {else}
3ea7ca33 43 {if $statusProfile EQ 1} {* Update Participant Status in batch task *}
f72db5fa 44 <div class="status">{$status}</div>
45 {/if}
46 {ts}Update field values for each participant as needed. To set a field to the same value for ALL rows, enter that value for the first participation and then click the
47 <strong>Copy icon</strong>
48 (next to the column title).{/ts}
6a488035 49 {/if}
d68d92a1 50 <p>{ts}Click <strong>Update Participant(s)</strong> below to save all your changes.{/ts}</p>
f72db5fa 51 </div>
6a488035
TO
52 <table class="crm-copy-fields">
53 <thead class="sticky">
54 <tr class="columnheader">
55 {foreach from=$readOnlyFields item=fTitle key=fName}
56 <td>{$fTitle}</td>
57 {/foreach}
58
59 <td>{ts}Event{/ts}</td>
60 {foreach from=$fields item=field key=fieldName}
61 <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>
62 {/foreach}
63
64 </tr>
65 </thead>
66 {foreach from=$componentIds item=pid}
67 <tr class="{cycle values="odd-row,even-row"}" entity_id="{$pid}">
68 {foreach from=$readOnlyFields item=fTitle key=fName}
69 <td>{$contactDetails.$pid.$fName}</td>
70 {/foreach}
71
72 <td class="crm-event-title">{$details.$pid.title}</td>
73 {foreach from=$fields item=field key=fieldName}
74 {assign var=n value=$field.name}
b8a6b00e
ML
75
76 {* CRM-19860 Copied from templates/CRM/Contact/Form/Task/Batch.tpl *}
77 {if $field.options_per_line}
78 <td class="compressed">
79 {assign var="count" value="1"}
80 {strip}
81 <table class="form-layout-compressed">
82 <tr>
83 {* sort by fails for option per line. Added a variable to iterate through the element array*}
84 {assign var="index" value="1"}
85 {foreach name=optionOuter key=optionKey item=optionItem from=$form.field.$pid.$n}
86 {if $index < 10}
87 {assign var="index" value=`$index+1`}
88 {else}
89 <td class="labels font-light">{$form.field.$pid.$n.$optionKey.html}</td>
90 {if $count == $field.options_per_line}
91 </tr>
92 <tr>
93 {assign var="count" value="1"}
94 {else}
95 {assign var="count" value=`$count+1`}
96 {/if}
97 {/if}
98 {/foreach}
99 </tr>
100 </table>
101 {/strip}
102 </td>
6a488035
TO
103 {else}
104 <td class="compressed">{$form.field.$pid.$n.html}</td>
105 {/if}
106 {/foreach}
107 </tr>
108 {/foreach}
109 </tr>
6a488035 110 </table>
0bdcd04c
MR
111<div class="crm-submit-buttons">
112{if $fields}{$form._qf_Batch_refresh.html}{/if}{include file="CRM/common/formButtons.tpl"}
113</div>
6a488035
TO
114</div>
115
116{if $context EQ 'statusChange'} {* Update Participant Status task *}
117{literal}
118<script type="text/javascript">
119/**
120 * Function to update participant status
121 */
3cc60a06 122CRM.$(function($) {
ae8f569f
CW
123 $('#status_change').change( function() {
124 if ( $(this).val() ) {
125 $('.crm-copy-fields [name^="field["][name*="[participant_status]"]').val( $(this).val() );
6a488035
TO
126 }
127 });
128
129});
130</script>
131{/literal}
132{/if}
133
134{*include batch copy js js file*}
135{include file="CRM/common/batchCopy.tpl"}