2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
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. |
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. |
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 +--------------------------------------------------------------------+
27 {* this template is used for adding/editing activities for a case. *}
29 {include file="CRM/Custom/Form/CustomData.tpl"}
31 <div class="crm-block crm-form-block crm-case-activity-form-block">
33 {if $action neq 8 and $action neq 32768 }
34 {* Include form buttons on top for new and edit modes. *}
35 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
37 {* added onload javascript for source contact*}
38 {include file="CRM/Activity/Form/ActivityJs.tpl" tokenContext="case_activity"}
42 {if $action eq 8 or $action eq 32768 }
43 <div class="messages status no-popup">
44 <div class="icon inform-icon"></div>
46 {ts 1=$activityTypeName}Click Delete to move this "%1" activity to the Trash.{/ts}
48 {ts 1=$activityTypeName}Click Restore to retrieve this "%1" activity from the Trash.{/ts}
52 <table class="form-layout">
53 {if $activityTypeDescription }
55 <div id="help">{$activityTypeDescription}</div>
58 {* Block for change status, case type and start date. *}
59 {if $activityTypeFile EQ 'ChangeCaseStatus'
60 || $activityTypeFile EQ 'ChangeCaseType'
61 || $activityTypeFile EQ 'ChangeCaseStartDate'}
62 {include file="CRM/Case/Form/Activity/$activityTypeFile.tpl"}
63 <tr class="crm-case-activity-form-block-details">
64 <td class="label">{ts}Notes{/ts}</td>
65 <td class="view-value">
66 {* If using plain textarea, assign class=huge to make input large enough. *}
67 {if $defaultWysiwygEditor eq 0}{$form.details.html|crmAddClass:huge}{else}{$form.details.html}{/if}
70 {* Added Activity Details accordion tab *}
71 <tr class="crm-case-activity-form-block-activity-details">
73 <div id="activity-details" class="crm-accordion-wrapper collapsed">
74 <div class="crm-accordion-header">
75 {ts}Activity Details{/ts}
76 </div><!-- /.crm-accordion-header -->
77 <div class="crm-accordion-body">
79 {* End block for change status, case type and start date. *}
80 <table class="form-layout-compressed">
82 <tr id="with-clients" class="crm-case-activity-form-block-client_name">
83 <td class="label font-size12pt">{ts}Client{/ts}</td>
84 <td class="view-value">
85 <span class="font-size12pt">
86 {foreach from=$client_names item=client name=clients key=id}
87 {foreach from=$client_names.$id item=client1}
88 {$client1.display_name}
90 {if not $smarty.foreach.clients.last}; {/if}
94 {if $action eq 1 or $action eq 2}
96 <a href="#" class="crm-with-contact">» {ts}With other contact(s){/ts}</a>
101 {if $action eq 1 or $action eq 2}
102 <tr class="crm-case-activity-form-block-target_contact_id hide-block" id="with-contacts-widget">
103 <td class="label font-size10pt">{ts}With Contact{/ts}</td>
104 <td class="view-value">
105 {$form.target_contact_id.html}
107 <a href="#" class="crm-with-contact">
108 » {if not $multiClient}{ts}With client{/ts}{else}{ts}With client(s){/ts}{/if}
114 <tr class="crm-case-activity-form-block-activityTypeName">
115 <td class="label">{ts}Activity Type{/ts}</td>
116 <td class="view-value bold">{$activityTypeName|escape}</td>
118 <tr class="crm-case-activity-form-block-source_contact_id">
119 <td class="label">{$form.source_contact_id.label}</td>
120 <td class="view-value">{$form.source_contact_id.html}</td>
122 <tr class="crm-case-activity-form-block-assignee_contact_id">
124 {$form.assignee_contact_id.label}
125 {edit}{help id="assignee_contact_id" title=$form.assignee_contact_id.label file="CRM/Activity/Form/Activity"}{/edit}
127 <td>{$form.assignee_contact_id.html}
128 {if $activityAssigneeNotification}
130 <span class="description"><span class="icon email-icon"></span>{ts}A copy of this activity will be emailed to each Assignee.{/ts}</span>
135 {* Include special processing fields if any are defined for this activity type (e.g. Change Case Status / Change Case Type). *}
137 {if $activityTypeFile neq 'ChangeCaseStartDate'}
138 <tr class="crm-case-activity-form-block-subject">
139 <td class="label">{$form.subject.label}</td><td class="view-value">{$form.subject.html|crmAddClass:huge}</td>
142 <tr class="crm-case-activity-form-block-medium_id">
143 <td class="label">{$form.medium_id.label}</td>
144 <td class="view-value">{$form.medium_id.html} {$form.location.label} {$form.location.html|crmAddClass:huge}</td>
146 <tr class="crm-case-activity-form-block-activity_date_time">
147 <td class="label">{$form.activity_date_time.label}</td>
148 {if $action eq 2 && $activityTypeFile eq 'OpenCase'}
149 <td class="view-value">{$current_activity_date_time|crmDate}
150 <div class="description">Use a <a href="{$changeStartURL}">Change Start Date</a> activity to change the date</div>
151 {* avoid errors about missing field *}
152 <div style="display: none;">{include file="CRM/common/jcalendar.tpl" elementName=activity_date_time}</div>
155 <td class="view-value">{include file="CRM/common/jcalendar.tpl" elementName=activity_date_time}</td>
159 <td colspan="2"><div id="customData"></div></td>
161 {if NOT $activityTypeFile}
162 <tr class="crm-case-activity-form-block-details">
163 <td class="label">{$form.details.label}</td>
164 <td class="view-value">
165 {* If using plain textarea, assign class=huge to make input large enough. *}
166 {if $defaultWysiwygEditor eq 0}{$form.details.html|crmAddClass:huge}{else}{$form.details.html}{/if}
170 <tr class="crm-case-activity-form-block-duration">
171 <td class="label">{$form.duration.label}</td>
172 <td class="view-value">
173 {$form.duration.html}
174 <span class="description">{ts}minutes{/ts}</span>
178 {if $activityTypeFile EQ 'ChangeCaseStatus'
179 || $activityTypeFile EQ 'ChangeCaseType'
180 || $activityTypeFile EQ 'ChangeCaseStartDate'}
181 </div><!-- /.crm-accordion-body -->
182 </div><!-- /.crm-accordion-wrapper -->
183 {* End of Activity Details accordion tab *}
187 <tr class="crm-case-activity-form-block-attachment">
188 <td colspan="2">{include file="CRM/Form/attachment.tpl"}</td>
190 {if $searchRows} {* We have got case role rows to display for "Send Copy To" feature *}
191 <tr class="crm-case-activity-form-block-send_copy">
193 <div id="sendcopy" class="crm-accordion-wrapper collapsed">
194 <div class="crm-accordion-header">
196 </div><!-- /.crm-accordion-header -->
197 <div id="sendcopy-body" class="crm-accordion-body">
199 <div class="description">{ts}Email a complete copy of this activity record to other people involved with the case. Click the top left box to select all.{/ts}</div>
201 <table class="row-highlight">
202 <tr class="columnheader">
203 <th>{$form.toggleSelect.html} </th>
204 <th>{ts}Case Role{/ts}</th>
205 <th>{ts}Name{/ts}</th>
206 <th>{ts}Email{/ts}</th>
207 {if $countId gt 1}<th>{ts}Target Contact{/ts}</th>{/if}
209 {foreach from=$searchRows item=row key=id}
210 {foreach from=$searchRows.$id item=row1 key=id1}
211 <tr class="{cycle values="odd-row,even-row"}">
212 <td class="crm-case-activity-form-block-contact_{$id}">{$form.contact_check[$id].html}</td>
213 <td class="crm-case-activity-form-block-role">{$row1.role}</td>
214 <td class="crm-case-activity-form-block-display_name">{$row1.display_name}</td>
215 <td class="crm-case-activity-form-block-email">{$row1.email}</td>
216 {if $countId gt 1}<td class="crm-case-activity-form-block-display_name">{$row1.managerOf}</td>{/if}
222 </div><!-- /.crm-accordion-body -->
223 </div><!-- /.crm-accordion-wrapper -->
227 <tr class="crm-case-activity-form-block-schedule_followup">
230 <div id="follow-up" class="crm-accordion-wrapper collapsed">
231 <div class="crm-accordion-header">
232 {ts}Schedule Follow-up{/ts}
233 </div><!-- /.crm-accordion-header -->
234 <div class="crm-accordion-body">
236 <table class="form-layout-compressed">
237 <tr class="crm-case-activity-form-block-followup_activity_type_id">
238 <td class="label">{ts}Schedule Follow-up Activity{/ts}</td>
239 <td>{$form.followup_activity_type_id.html} {ts}on{/ts}
240 {include file="CRM/common/jcalendar.tpl" elementName=followup_date}
243 <tr class="crm-case-activity-form-block-followup_activity_subject">
244 <td class="label">{$form.followup_activity_subject.label}</td>
245 <td>{$form.followup_activity_subject.html|crmAddClass:huge}</td>
249 {$form.followup_assignee_contact_id.label}
254 {$form.followup_assignee_contact_id.html}
258 </div><!-- /.crm-accordion-body -->
259 </div><!-- /.crm-accordion-wrapper -->
262 {* Suppress activity status and priority for changes to status, case type and start date. PostProc will force status to completed. *}
263 {if $activityTypeFile NEQ 'ChangeCaseStatus'
264 && $activityTypeFile NEQ 'ChangeCaseType'
265 && $activityTypeFile NEQ 'ChangeCaseStartDate'}
266 <table class="form-layout-compressed">
267 <tr class="crm-case-activity-form-block-status_id">
268 <td class="label">{$form.status_id.label}</td><td class="view-value">{$form.status_id.html}</td>
270 <tr class="crm-case-activity-form-block-priority_id">
271 <td class="label">{$form.priority_id.label}</td><td class="view-value">{$form.priority_id.html}</td>
276 <tr class="crm-case-activity-form-block-tag">
277 <td class="label">{$form.tag.label}</td>
278 <td class="view-value">
279 <div class="crm-select-container">{$form.tag.html}</div>
283 <tr class="crm-case-activity-form-block-tag_set"><td colspan="2">{include file="CRM/common/Tagset.tpl" tagsetType='activity'}</td></tr>
288 {crmRegion name='case-activity-form'}{/crmRegion}
290 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
292 {if $action eq 1 or $action eq 2}
293 {*include custom data js file*}
294 {include file="CRM/common/customData.tpl"}
296 <script type="text/javascript">
299 {if $customDataSubType}
300 CRM.buildCustomData( '{$customDataType}', {$customDataSubType} );
302 CRM.buildCustomData( '{$customDataType}' );
310 {if $action neq 8 and $action neq 32768 and empty($activityTypeFile)}
311 <script type="text/javascript">
313 cj('#sendcopy').crmAccordionToggle();
316 cj('#follow-up').crmAccordionToggle();
320 {if $action eq 2 or $action eq 1}
322 <script type="text/javascript">
324 cj('.crm-with-contact').click(function(){
325 cj('#with-contacts-widget').toggle();
326 cj('#with-clients').toggle();
334 {/if} {* end of main if block*}