Merge pull request #9361 from tschuettler/CRM-19617
[civicrm-core.git] / templates / CRM / Event / Form / Task / Batch.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
2c4c49ca 3 | CiviCRM version 4.7 |
6a488035 4 +--------------------------------------------------------------------+
fa938177 5 | Copyright CiviCRM LLC (c) 2004-2016 |
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">
27<fieldset>
f72db5fa 28 <div class="help">
6a488035 29 {if $context EQ 'statusChange'} {* Update Participant Status task *}
4a64b915 30 {ts}Update the status for each participant individually below, or change all statuses to:{/ts}
f72db5fa 31 {$form.status_change.html} {help id="id-status_change"}
1aa1efef
AH
32 {if $status}
33 <div class="status">
4a64b915
AH
34 <p>{ts}This form <strong>will send email</strong> to contacts only in certain circumstances:{/ts}</p>
35 <ul>
36 <li>{ts}<strong>Resolving "Pay Later" registrations:</strong> Participants 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 37 {if $notifyingStatuses}
4a64b915 38 <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 39 {/if}
4a64b915 40 </ul>
1aa1efef
AH
41 </div>
42 {/if}
6a488035 43 {else}
3ea7ca33 44 {if $statusProfile EQ 1} {* Update Participant Status in batch task *}
f72db5fa 45 <div class="status">{$status}</div>
46 {/if}
47 {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
48 <strong>Copy icon</strong>
49 (next to the column title).{/ts}
6a488035 50 {/if}
d68d92a1 51 <p>{ts}Click <strong>Update Participant(s)</strong> below to save all your changes.{/ts}</p>
f72db5fa 52 </div>
6a488035
TO
53 <table class="crm-copy-fields">
54 <thead class="sticky">
55 <tr class="columnheader">
56 {foreach from=$readOnlyFields item=fTitle key=fName}
57 <td>{$fTitle}</td>
58 {/foreach}
59
60 <td>{ts}Event{/ts}</td>
61 {foreach from=$fields item=field key=fieldName}
62 <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>
63 {/foreach}
64
65 </tr>
66 </thead>
67 {foreach from=$componentIds item=pid}
68 <tr class="{cycle values="odd-row,even-row"}" entity_id="{$pid}">
69 {foreach from=$readOnlyFields item=fTitle key=fName}
70 <td>{$contactDetails.$pid.$fName}</td>
71 {/foreach}
72
73 <td class="crm-event-title">{$details.$pid.title}</td>
74 {foreach from=$fields item=field key=fieldName}
75 {assign var=n value=$field.name}
217c192b 76 {if ( $n eq 'participant_register_date' ) }
6a488035
TO
77 <td class="compressed">{include file="CRM/common/jcalendar.tpl" elementName=$n elementIndex=$pid batchUpdate=1}</td>
78 {else}
79 <td class="compressed">{$form.field.$pid.$n.html}</td>
80 {/if}
81 {/foreach}
82 </tr>
83 {/foreach}
84 </tr>
85 <tr>
86 <td>&nbsp;</td>
87 <td>&nbsp;</td>
88 <td> {if $fields}{$form._qf_Batch_refresh.html}{/if}{include file="CRM/common/formButtons.tpl"}
89 </td>
90 </tr>
91 </table>
92
93</fieldset>
94</div>
95
96{if $context EQ 'statusChange'} {* Update Participant Status task *}
97{literal}
98<script type="text/javascript">
99/**
100 * Function to update participant status
101 */
3cc60a06 102CRM.$(function($) {
ae8f569f
CW
103 $('#status_change').change( function() {
104 if ( $(this).val() ) {
105 $('.crm-copy-fields [name^="field["][name*="[participant_status]"]').val( $(this).val() );
6a488035
TO
106 }
107 });
108
109});
110</script>
111{/literal}
112{/if}
113
114{*include batch copy js js file*}
115{include file="CRM/common/batchCopy.tpl"}