Merge pull request #15820 from seamuslee001/dev_core_183_custom_contribsybnt
[civicrm-core.git] / templates / CRM / Case / Form / Case.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
9 *}
10 {* Base template for Open Case. May be used for other special activity types at some point ..
11 Note: 1. We will include all the activity fields here however each activity type file may build (via php) only those required by them.
12 2. Each activity type file can include its case fields in its own template, so that they will be included during activity edit.
13 *}
14 <div class="crm-block crm-form-block crm-case-form-block">
15
16 {if $action neq 8 && $action neq 32768}
17 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
18 {/if}
19
20 <h3>{if $action eq 8}{ts}Delete Case{/ts}{elseif $action eq 32768}{ts}Restore Case{/ts}{/if}</h3>
21 {if $action eq 8 or $action eq 32768 }
22 <div class="messages status no-popup">
23 <div class="icon inform-icon"></div>
24 {if $action eq 8}
25 {ts}Click Delete to move this case and all associated activities to the Trash.{/ts}
26 {else}
27 {ts}Click Restore to retrieve this case and all associated activities from the Trash.{/ts}
28 {/if}
29 </div>
30 {else}
31 <table class="form-layout">
32 {if $activityTypeDescription }
33 <tr>
34 <div class="help">{$activityTypeDescription}</div>
35 </tr>
36 {/if}
37 {if $clientName}
38 <tr class="crm-case-form-block-clientName">
39 <td class="label font-size12pt">{ts}Client{/ts}</td>
40 <td class="font-size12pt bold view-value">{$clientName}</td>
41 </tr>
42 {elseif !$clientName and $action eq 1}
43 {if $context eq 'standalone'}
44 <td class="label">{$form.client_id.label}</td>
45 <td class="view-value">{$form.client_id.html}</td>
46 {/if}
47 {/if}
48 {* activity fields *}
49 {if $form.medium_id.html and $form.activity_location.html}
50 <tr class="crm-case-form-block-medium_id">
51 <td class="label">{$form.medium_id.label}</td>
52 <td class="view-value">{$form.medium_id.html}&nbsp;&nbsp;&nbsp;{$form.activity_location.label} &nbsp;{$form.activity_location.html}</td>
53 </tr>
54 {/if}
55
56 {if $form.activity_details.html}
57 <tr class="crm-case-form-block-activity_details">
58 <td class="label">{$form.activity_details.label}{help id="id-details" activityTypeFile=$activityTypeFile file="CRM/Case/Form/Case.hlp"}</td>
59 <td class="view-value">{$form.activity_details.html|crmStripAlternatives}</td>
60 </tr>
61 {/if}
62
63 {* custom data group *}
64 {* This shows ACTIVITY custom fields, as opposed to CASE custom fields, so is not a duplicate of the other custom data block below. *}
65 {if $groupTree}
66 <tr>
67 <td colspan="2">{include file="CRM/Custom/Form/CustomData.tpl"}</td>
68 </tr>
69 {/if}
70
71 {if $form.activity_subject.html}
72 <tr class="crm-case-form-block-activity_subject">
73 <td class="label">{$form.activity_subject.label}{help id="id-activity_subject" activityTypeFile=$activityTypeFile file="CRM/Case/Form/Case.hlp"}</td>
74 <td>{$form.activity_subject.html|crmAddClass:huge}</td>
75 </tr>
76 {/if}
77
78 {* inject activity type-specific form fields *}
79 {if $activityTypeFile}
80 {include file="CRM/Case/Form/Activity/$activityTypeFile.tpl"}
81 {/if}
82
83 {if $form.duration.html}
84 <tr class="crm-case-form-block-duration">
85 <td class="label">{$form.duration.label}</td>
86 <td class="view-value">
87 {$form.duration.html}
88 <span class="description">{ts}minutes{/ts}</span>
89 </td>
90 </tr>
91 {/if}
92
93 {if $form.tag.html}
94 <tr class="crm-case-form-block-tag">
95 <td class="label">{$form.tag.label}</td>
96 <td class="view-value"><div class="crm-select-container">{$form.tag.html}</div>
97 </td>
98 </tr>
99 {/if}
100
101 {* This shows CASE custom fields, as opposed to ACTIVITY custom fields, so is not a duplicate of the other custom data block above. *}
102 <tr class="crm-case-form-block-custom_data">
103 <td colspan="2">
104 {include file="CRM/common/customDataBlock.tpl"}
105 </td>
106 </tr>
107
108 <tr class="crm-case-form-block-tag_set">
109 {include file="CRM/common/Tagset.tpl" tagsetType='case' tableLayout=true}
110 </tr>
111
112 </table>
113 {/if}
114
115 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
116
117 </div>