Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
3 | | CiviCRM version 4.3 | | |
4 | +--------------------------------------------------------------------+ | |
5 | | Copyright CiviCRM LLC (c) 2004-2013 | | |
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 | {if $notifyingStatuses} | |
33 | <div class="status"> | |
34 | {ts 1=$notifyingStatuses}Participants whose status is changed TO any of the following will be automatically notified via email: %1.{/ts} | |
35 | </div> | |
36 | {/if} | |
37 | {else} | |
38 | {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} | |
39 | {/if} | |
40 | <p>{ts}Click <strong>Update Participant(s)</strong> below to save all your changes.{/ts}</p> | |
41 | </div> | |
42 | <legend>{$profileTitle}</legend> | |
43 | <table class="crm-copy-fields"> | |
44 | <thead class="sticky"> | |
45 | <tr class="columnheader"> | |
46 | {foreach from=$readOnlyFields item=fTitle key=fName} | |
47 | <td>{$fTitle}</td> | |
48 | {/foreach} | |
49 | ||
50 | <td>{ts}Event{/ts}</td> | |
51 | {foreach from=$fields item=field key=fieldName} | |
52 | <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> | |
53 | {/foreach} | |
54 | ||
55 | </tr> | |
56 | </thead> | |
57 | {foreach from=$componentIds item=pid} | |
58 | <tr class="{cycle values="odd-row,even-row"}" entity_id="{$pid}"> | |
59 | {foreach from=$readOnlyFields item=fTitle key=fName} | |
60 | <td>{$contactDetails.$pid.$fName}</td> | |
61 | {/foreach} | |
62 | ||
63 | <td class="crm-event-title">{$details.$pid.title}</td> | |
64 | {foreach from=$fields item=field key=fieldName} | |
65 | {assign var=n value=$field.name} | |
66 | {if ( $fields.$n.data_type eq 'Date') or ( $n eq 'participant_register_date' ) } | |
67 | <td class="compressed">{include file="CRM/common/jcalendar.tpl" elementName=$n elementIndex=$pid batchUpdate=1}</td> | |
68 | {else} | |
69 | <td class="compressed">{$form.field.$pid.$n.html}</td> | |
70 | {/if} | |
71 | {/foreach} | |
72 | </tr> | |
73 | {/foreach} | |
74 | </tr> | |
75 | <tr> | |
76 | <td> </td> | |
77 | <td> </td> | |
78 | <td> {if $fields}{$form._qf_Batch_refresh.html}{/if}{include file="CRM/common/formButtons.tpl"} | |
79 | </td> | |
80 | </tr> | |
81 | </table> | |
82 | ||
83 | </fieldset> | |
84 | </div> | |
85 | ||
86 | {if $context EQ 'statusChange'} {* Update Participant Status task *} | |
87 | {literal} | |
88 | <script type="text/javascript"> | |
89 | /** | |
90 | * Function to update participant status | |
91 | */ | |
92 | cj( function(){ | |
93 | cj('#status_change').change( function() { | |
94 | if ( cj(this).val() ) { | |
95 | cj('.crm-copy-fields [name^="field["][name*="[participant_status]"]').val( cj(this).val() ); | |
96 | } | |
97 | }); | |
98 | ||
99 | }); | |
100 | </script> | |
101 | {/literal} | |
102 | {/if} | |
103 | ||
104 | {*include batch copy js js file*} | |
105 | {include file="CRM/common/batchCopy.tpl"} |