Merge branch 'angular-tests' of https://github.com/giant-rabbit/civicrm-core into...
[civicrm-core.git] / templates / CRM / Event / Form / Task / Batch.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.6 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
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>
28 <div id="help">
29 {if $context EQ 'statusChange'} {* Update Participant Status task *}
30 {ts}Update the status for each participant individually, OR change all statuses to:{/ts}
31 {$form.status_change.html} {help id="id-status_change"}
32 <div class="status">
33 {ts}Participants whose status is changed FROM Pending Pay Later TO Registered or Attended will receive a confirmation email and their payment status will be set to completed. If this is not what you want to do, you can change their participant status by editing their event registration record directly.{/ts}
34 </div>
35 {if $notifyingStatuses}
36 <div class="status">
37 {ts 1=$notifyingStatuses}Participants whose status is changed TO any of the following will be automatically notified via email: %1.{/ts}
38 </div>
39 {/if}
40 {else}
41 {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 <strong>Copy icon</strong> (next to the column title).{/ts}
42 {/if}
43 <p>{ts}Click <strong>Update Participant(s)</strong> below to save all your changes.{/ts}</p>
44 </div>
45 <legend>{$profileTitle}</legend>
46 <table class="crm-copy-fields">
47 <thead class="sticky">
48 <tr class="columnheader">
49 {foreach from=$readOnlyFields item=fTitle key=fName}
50 <td>{$fTitle}</td>
51 {/foreach}
52
53 <td>{ts}Event{/ts}</td>
54 {foreach from=$fields item=field key=fieldName}
55 <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>
56 {/foreach}
57
58 </tr>
59 </thead>
60 {foreach from=$componentIds item=pid}
61 <tr class="{cycle values="odd-row,even-row"}" entity_id="{$pid}">
62 {foreach from=$readOnlyFields item=fTitle key=fName}
63 <td>{$contactDetails.$pid.$fName}</td>
64 {/foreach}
65
66 <td class="crm-event-title">{$details.$pid.title}</td>
67 {foreach from=$fields item=field key=fieldName}
68 {assign var=n value=$field.name}
69 {if ( $fields.$n.data_type eq 'Date') or ( $n eq 'participant_register_date' ) }
70 <td class="compressed">{include file="CRM/common/jcalendar.tpl" elementName=$n elementIndex=$pid batchUpdate=1}</td>
71 {else}
72 <td class="compressed">{$form.field.$pid.$n.html}</td>
73 {/if}
74 {/foreach}
75 </tr>
76 {/foreach}
77 </tr>
78 <tr>
79 <td>&nbsp;</td>
80 <td>&nbsp;</td>
81 <td> {if $fields}{$form._qf_Batch_refresh.html}{/if}{include file="CRM/common/formButtons.tpl"}
82 </td>
83 </tr>
84 </table>
85
86 </fieldset>
87 </div>
88
89 {if $context EQ 'statusChange'} {* Update Participant Status task *}
90 {literal}
91 <script type="text/javascript">
92 /**
93 * Function to update participant status
94 */
95 CRM.$(function($) {
96 $('#status_change').change( function() {
97 if ( $(this).val() ) {
98 $('.crm-copy-fields [name^="field["][name*="[participant_status]"]').val( $(this).val() );
99 }
100 });
101
102 });
103 </script>
104 {/literal}
105 {/if}
106
107 {*include batch copy js js file*}
108 {include file="CRM/common/batchCopy.tpl"}